aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-06-24 15:56:42 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-06-24 15:56:42 -0400
commitd475b19e9ba7bc8870ec7bc1e10b5cc88decea0b (patch)
treef5d285cdad26e0545ec683fb790e6ea38ac6bef7 /src
parentaddf0e443f64951a437701f0d5a087c1d5968faf (diff)
fixed crash
Diffstat (limited to 'src')
-rw-r--r--src/new_fields/util.ts4
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