aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-05-21 18:30:48 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-05-21 18:30:48 -0400
commit2845bb8a29d4592964b707d82ca3b07ca15b632c (patch)
tree00dd3ff3e4cefcb24d7b0fa450c7e660acec31a5 /src/new_fields/Doc.ts
parentf196645935814b7f2d3faef0da7fd6c5d46f14f0 (diff)
Added highlighting of target doc
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index b0237d04d..793a83750 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -194,7 +194,7 @@ export namespace Doc {
// gets the document's prototype or returns the document if it is a prototype
export function GetProto(doc: Doc) {
- return Object.getOwnPropertyNames(doc).indexOf("isPrototype") === -1 ? doc.proto! : doc;
+ return Doc.GetT(doc, "isPrototype", "boolean", true) ? doc : doc.proto!;
}