diff options
author | bob <bcz@cs.brown.edu> | 2019-06-26 12:56:22 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-06-26 12:56:22 -0400 |
commit | 084dd6d9b0ad51133025ba6bd2702fc44b1b6c31 (patch) | |
tree | 323c734acf686a71ed78b10c336e8c0c25c2837d /src/new_fields/Doc.ts | |
parent | f089dba7a271512bcebca2741f2f4f31243ffd47 (diff) |
fixes to datadoc usage. fixed tree view for textboxes.
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r-- | src/new_fields/Doc.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index 8825bc13a..ddbbc1436 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -178,7 +178,7 @@ export namespace Doc { export async function SetInPlace(doc: Doc, key: string, value: Field | undefined, defaultProto: boolean) { let hasProto = doc.proto instanceof Doc; let onDeleg = Object.getOwnPropertyNames(doc).indexOf(key) !== -1; - let onProto = Object.getOwnPropertyNames(doc.proto).indexOf(key) !== -1; + let onProto = hasProto && Object.getOwnPropertyNames(doc.proto).indexOf(key) !== -1; if (onDeleg || !hasProto || (!onProto && !defaultProto)) doc[key] = value; else doc.proto![key] = value; |