Skip to content

Commit d02dc6e

Browse files
authored
Merge pull request #3276 from swagger-api/feature/misuse-of-findIndex
Fix a case of misusing findIndex.
2 parents 4c2a6f4 + 841dcaf commit d02dc6e

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

dist/swagger-ui-bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/plugins/spec/reducers.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { fromJS } from "immutable"
22
import { fromJSOrdered, validateParam } from "core/utils"
33
import win from "../../window"
4-
import findIndex from "lodash/findIndex"
54

65
import {
76
UPDATE_SPEC,
@@ -42,7 +41,7 @@ export default {
4241
[UPDATE_PARAM]: ( state, {payload} ) => {
4342
let { path, paramName, value, isXml } = payload
4443
return state.updateIn( [ "resolved", "paths", ...path, "parameters" ], fromJS([]), parameters => {
45-
const index = findIndex(parameters, p => p.get( "name" ) === paramName )
44+
const index = parameters.findIndex(p => p.get( "name" ) === paramName )
4645
if (!(value instanceof win.File)) {
4746
value = fromJSOrdered( value )
4847
}

0 commit comments

Comments
 (0)