From d475b19e9ba7bc8870ec7bc1e10b5cc88decea0b Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Mon, 24 Jun 2019 15:56:42 -0400 Subject: fixed crash --- src/new_fields/util.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2