This commit is contained in:
dntzhang 2018-11-07 08:06:13 +08:00
parent 656bb21ca2
commit 3c8ddec0c5
2 changed files with 3 additions and 4 deletions

View File

@ -4,7 +4,6 @@ export function observe(target) {
target.observe = true
}
export function proxyUpdate(ele) {
let timeout = null
ele.data = new JSONProxy(ele.data).observe(false, info => {

View File

@ -57,7 +57,7 @@ const JSONPatcherProxy = (function() {
function setTrap(instance, target, key, newValue) {
const parentPath = findObjectPath(instance, target)
const destinationPropKey = parentPath + '/' + escapePathComponent(key)
const destinationPropKey = parentPath + '/' + escapePathComponent(key)
if (instance.proxifiedObjectsMap.has(newValue)) {
const newValueOriginalObject = instance.proxifiedObjectsMap.get(newValue)
@ -145,8 +145,8 @@ const JSONPatcherProxy = (function() {
}
}
operation.value = newValue
}
operation.oldValue = target[key]
}
operation.oldValue = target[key]
const reflectionResult = Reflect.set(target, key, newValue)
instance.defaultCallback(operation)
return reflectionResult