diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-06-26 21:58:16 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-06-26 21:58:16 -0400 |
commit | d26f4ec591f8b956e0e02b82e44fc5cc8bcfbe50 (patch) | |
tree | 256ae061e48fc83b15a8ea27040a722f394d084c /src/new_fields/Doc.ts | |
parent | 859fc4e298bf3d022201c87db225fc1981356fa1 (diff) | |
parent | deb85766ac5648cc8e3ab4bf9d182ac5bbbbe144 (diff) |
Merge branch 'master' into templatesMac
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r-- | src/new_fields/Doc.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index ddbbc1436..c1256a6a3 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -179,9 +179,9 @@ export namespace Doc { let hasProto = doc.proto instanceof Doc; let onDeleg = Object.getOwnPropertyNames(doc).indexOf(key) !== -1; let onProto = hasProto && Object.getOwnPropertyNames(doc.proto).indexOf(key) !== -1; - if (onDeleg || !hasProto || (!onProto && !defaultProto)) + if (onDeleg || !hasProto || (!onProto && !defaultProto)) { doc[key] = value; - else doc.proto![key] = value; + } else doc.proto![key] = value; } export async function SetOnPrototype(doc: Doc, key: string, value: Field) { const proto = Object.getOwnPropertyNames(doc).indexOf("isPrototype") === -1 ? doc.proto : doc; |