aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-06-12 14:41:57 -0400
committeryipstanley <stanley_yip@brown.edu>2019-06-12 14:41:57 -0400
commit188033d3b013326b3233cd9ce33793e7561e03a6 (patch)
treead5bd29dd114986c59697526b5d3202ed7be7c22 /src/new_fields/Doc.ts
parent9ec4a529dc886acca8f147cfe913e60f938f3bda (diff)
parenta638c12cde39a3ea5193a8038f72a55d706d9af8 (diff)
nice!
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index 7f7263cf1..7e02a5bc5 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -211,13 +211,11 @@ export namespace Doc {
return Array.from(results);
}
-
export function MakeAlias(doc: Doc) {
- const alias = new Doc;
if (!GetT(doc, "isPrototype", "boolean", true)) {
- alias.proto = doc.proto;
+ return Doc.MakeCopy(doc);
}
- return alias;
+ return new Doc;
}
export function MakeCopy(doc: Doc, copyProto: boolean = false): Doc {