From 077a38dc22f6082974e639f8a020ceb179116958 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 14 Aug 2020 18:08:47 -0400 Subject: fixed some edge cses with richTextMenu synchronization. added author field to delegates --- src/fields/Doc.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/fields/Doc.ts') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index ea53bc9a2..b530b1cf7 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -781,6 +781,7 @@ export namespace Doc { if (doc) { const delegate = new Doc(id, true); delegate.proto = doc; + delegate.author = Doc.CurrentUserEmail; title && (delegate.title = title); return delegate; } -- cgit v1.2.3-70-g09d2 From cd7b13c2c1086739d866e4a6ad9c239a46d89244 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 14 Aug 2020 18:19:20 -0400 Subject: fix to give an author to template doc protos. --- src/fields/Doc.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/fields/Doc.ts') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index b530b1cf7..5f5fe98bc 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -791,7 +791,9 @@ export namespace Doc { let _applyCount: number = 0; export function ApplyTemplate(templateDoc: Doc) { if (templateDoc) { - const target = Doc.MakeDelegate(new Doc()); + const proto = new Doc(); + proto.author = Doc.CurrentUserEmail; + const target = Doc.MakeDelegate(proto); const targetKey = StrCast(templateDoc.layoutKey, "layout"); const applied = ApplyTemplateTo(templateDoc, target, targetKey, templateDoc.title + "(..." + _applyCount++ + ")"); target.layoutKey = targetKey; -- cgit v1.2.3-70-g09d2