diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-06-24 15:56:42 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-06-24 15:56:42 -0400 |
commit | d475b19e9ba7bc8870ec7bc1e10b5cc88decea0b (patch) | |
tree | f5d285cdad26e0545ec683fb790e6ea38ac6bef7 /src | |
parent | addf0e443f64951a437701f0d5a087c1d5968faf (diff) |
fixed crash
Diffstat (limited to 'src')
-rw-r--r-- | src/new_fields/util.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/new_fields/util.ts b/src/new_fields/util.ts index cadd8f8d0..abb777adf 100644 --- a/src/new_fields/util.ts +++ b/src/new_fields/util.ts @@ -21,7 +21,9 @@ const _setterImpl = action(function (target: any, prop: string | symbol | number target[prop] = value; return true; } - value = value[SelfProxy] || value; + if (value !== undefined) { + value = value[SelfProxy] || value; + } const curValue = target.__fields[prop]; if (curValue === value || (curValue instanceof ProxyField && value instanceof RefField && curValue.fieldId === value[Id])) { // TODO This kind of checks correctly in the case that curValue is a ProxyField and value is a RefField, but technically |