diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-06-18 16:37:28 -0400 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-06-18 16:37:28 -0400 |
| commit | b0ac30172019713e1c75083c1199485d902e0eed (patch) | |
| tree | 3f0cb62aeb09d29830e749b48c26266559a4b0cb /src/new_fields/Doc.ts | |
| parent | d3cad099d49690810166d0342f7c371bda0f007e (diff) | |
Fixed zoomBasis stuff and added deletion handling for reponse from server
Diffstat (limited to 'src/new_fields/Doc.ts')
| -rw-r--r-- | src/new_fields/Doc.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index c2cfda079..1b0ff812f 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -132,6 +132,16 @@ export class Doc extends RefField { this[fKey] = value; } } + const unset = diff.$unset; + if (unset) { + for (const key in unset) { + if (!key.startsWith("fields.")) { + continue; + } + const fKey = key.substring(7); + delete this[fKey]; + } + } } } |
