diff options
| author | bob <bcz@cs.brown.edu> | 2019-09-16 10:36:16 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-09-16 10:36:16 -0400 |
| commit | 5e3c12128f4d15d621b323e0f1d78bfff2452b92 (patch) | |
| tree | 209fef8663ee2ac55687ba7dc2be4d0b57ae2a3d /src/new_fields/Doc.ts | |
| parent | f428ac2621f123661a937405764058f27a9feefd (diff) | |
fixed templates to allow aliasing, clustering and other things.
Diffstat (limited to 'src/new_fields/Doc.ts')
| -rw-r--r-- | src/new_fields/Doc.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index eef14ad25..2434a439a 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -412,6 +412,9 @@ export namespace Doc { } export function MakeAlias(doc: Doc) { let alias = !GetT(doc, "isPrototype", "boolean", true) ? Doc.MakeCopy(doc) : Doc.MakeDelegate(doc); + if (alias.layout instanceof Doc) { + alias.layout = Doc.MakeAlias(alias.layout as Doc); + } let aliasNumber = Doc.GetProto(doc).aliasNumber = NumCast(Doc.GetProto(doc).aliasNumber) + 1; let script = `return renameAlias(self, ${aliasNumber})`; //let script = "StrCast(self.title).replace(/\\([0-9]*\\)/, \"\") + `(${n})`"; |
