diff options
Diffstat (limited to 'src/new_fields/util.ts')
-rw-r--r-- | src/new_fields/util.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/new_fields/util.ts b/src/new_fields/util.ts index b5e50d501..47e467041 100644 --- a/src/new_fields/util.ts +++ b/src/new_fields/util.ts @@ -50,6 +50,7 @@ const _setterImpl = action(function (target: any, prop: string | symbol | number target.__fields[prop] = value; } if (value === undefined) target[Update]({ '$unset': { ["fields." + prop]: "" } }); + if (typeof value === "object" && !(value instanceof ObjectField)) debugger; else target[Update]({ '$set': { ["fields." + prop]: value instanceof ObjectField ? SerializationHelper.Serialize(value) : (value === undefined ? null : value) } }); UndoManager.AddEvent({ redo: () => receiver[prop] = value, |