aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorStanley Yip <33562077+yipstanley@users.noreply.github.com>2020-02-29 14:20:01 -0500
committerGitHub <noreply@github.com>2020-02-29 14:20:01 -0500
commitbb2f6955bef4f079c0fa7213e80fde7a76847799 (patch)
treeef5e70925b8cdeb8229af849e33e6f3a4cceae7f /src/new_fields/Doc.ts
parent640f14da28d97600fb32d09023fc932e3a4052c4 (diff)
parent2f6e27c67d1790d4350eede3003f0b614460f4d1 (diff)
Merge pull request #343 from browngraphicslab/pen
Pen
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index ba8e21100..dcd97f079 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -355,6 +355,10 @@ export namespace Doc {
const proto = doc && (Doc.GetT(doc, "isPrototype", "boolean", true) ? doc : (doc.proto || doc));
return proto === doc ? proto : Doc.GetProto(proto);
}
+ export function GetDataDoc(doc: Doc): Doc {
+ const proto = Doc.GetProto(doc);
+ return proto === doc ? proto : Doc.GetDataDoc(proto);
+ }
export function allKeys(doc: Doc): string[] {
const results: Set<string> = new Set;