You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
294 B
17 lines
294 B
5 years ago
|
import { toJS } from '../utils/index'
|
||
|
|
||
|
const opSet = (op, [map, ops]) => {
|
||
|
const { link, value, obj, key } = op
|
||
|
try {
|
||
|
map[obj][key] = link ? map[value] : value
|
||
|
|
||
|
return [map, ops]
|
||
|
} catch (e) {
|
||
|
console.error(e, op, toJS(map))
|
||
|
|
||
|
return [map, ops]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default opSet
|