diff options
author | Stanley Yip <33562077+yipstanley@users.noreply.github.com> | 2020-02-29 14:20:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 14:20:01 -0500 |
commit | bb2f6955bef4f079c0fa7213e80fde7a76847799 (patch) | |
tree | ef5e70925b8cdeb8229af849e33e6f3a4cceae7f /src/new_fields/Doc.ts | |
parent | 640f14da28d97600fb32d09023fc932e3a4052c4 (diff) | |
parent | 2f6e27c67d1790d4350eede3003f0b614460f4d1 (diff) |
Merge pull request #343 from browngraphicslab/pen
Pen
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r-- | src/new_fields/Doc.ts | 4 |
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; |