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.
cudr_slate-collaborative/packages/bridge/src/convert/set.ts

17 lines
294 B

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