Fix mis-use of findIndex ( these really must be tested )
This commit is contained in:
@@ -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,
|
||||
@@ -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 )
|
||||
const index = parameters.findIndex(p => p.get( "name" ) === paramName )
|
||||
if (!(value instanceof win.File)) {
|
||||
value = fromJSOrdered( value )
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user