Skip to content

Commit

Permalink
Merge pull request #5 from datagovsg/fix-param-example
Browse files Browse the repository at this point in the history
fix param example issue
  • Loading branch information
abby-ng authored Jun 21, 2017
2 parents 31da445 + c558585 commit 5d9dc9c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 39 deletions.
56 changes: 28 additions & 28 deletions dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions dist/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/core/plugins/spec/reducers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { fromJS } from "immutable"
import { fromJSOrdered, validateParam } from "core/utils"
import win from "../../window"
import findIndex from "lodash/findIndex"

import {
UPDATE_SPEC,
Expand Down Expand Up @@ -42,7 +41,7 @@ export default {
[UPDATE_PARAM]: ( state, {payload} ) => {
let { path, paramName, value, isXml } = payload
return state.updateIn( [ "resolved", "paths", ...path, "parameters" ], fromJS([]), parameters => {
const index = findIndex(parameters, p => p.get( "name" ) === paramName )
let index = parameters.findIndex( p => p.get( "name" ) === paramName )
if (!(value instanceof win.File)) {
value = fromJSOrdered( value )
}
Expand Down

0 comments on commit 5d9dc9c

Please sign in to comment.