aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Doc.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-03-10 10:18:03 -0400
committerbobzel <zzzman@gmail.com>2024-03-10 10:18:03 -0400
commitff594dffaf804e9597ad43d01d157d00e5f20504 (patch)
tree5345b9050bf3fef7d7f49c7281848bf153902eed /src/fields/Doc.ts
parent02513526216f55b52225a74d4ba4a53d8d439bb0 (diff)
fixed copying a Doc with an expanded render template to copy the expanded render template in order not to lose instance data (eg, height, width)
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r--src/fields/Doc.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index 1433e5ffb..e47bfcbed 100644
--- a/src/fields/Doc.ts
+++ b/src/fields/Doc.ts
@@ -974,7 +974,7 @@ export namespace Doc {
} else if (field instanceof ObjectField) {
copy[key] =
doc[key] instanceof Doc && key.includes('layout[')
- ? undefined // remove expanded template field documents
+ ? new ProxyField(Doc.MakeCopy(doc[key] as any)) // copy the expanded render template
: ObjectField.MakeCopy(field);
} else if (field instanceof Promise) {
debugger; //This shouldn't happend...