diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-09-22 00:23:37 +0800 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-09-22 00:23:37 +0800 |
commit | 26519fe83cac96fe2578ca1c744075944092d21e (patch) | |
tree | 8e30b5160795d336afd8fe9f989c963f65844f94 /src/fields/util.ts | |
parent | 4b32d456917fa736798ece85223d08025b83e70d (diff) |
Update util.ts
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r-- | src/fields/util.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts index 9e5890aa8..2ff966e7e 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -362,7 +362,7 @@ export function updateFunction(target: any, prop: any, value: any, receiver: any const oldValue = current; const newValue = ObjectField.MakeCopy(value); current = newValue; - if (!(value instanceof CursorField) && !(value?.some((v: any) => v instanceof CursorField))) { + if (!(value instanceof CursorField) && !(value?.some?.((v: any) => v instanceof CursorField))) { UndoManager.AddEvent({ redo() { receiver[prop] = newValue; }, undo() { receiver[prop] = oldValue; } |