提交 ff16ecd9 编写于 作者: J Josh Ponelat

Fix mis-use of findIndex ( these really must be tested )

上级 23c26823
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 )
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册