Skip to content

Commit ff16ecd

Browse files
committed
Fix mis-use of findIndex ( these really must be tested )
1 parent 23c2682 commit ff16ecd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)