aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/new_fields/Doc.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index 219877f74..08efcad56 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -475,7 +475,7 @@ export namespace Doc {
// If it doesn't find the expanded layout, then it makes a delegate of the template layout and
// saves it on the data doc indexed by the template layout's id.
//
- const params = templateParams?.match(/\(([a-zA-Z0-9_-]*)\)/)?.[1]
+ const params = templateParams?.match(/\(([a-zA-Z0-9_-]*)\)/)?.[1].replace("()", "") || "";
const layoutFielddKey = Doc.LayoutFieldKey(templateLayoutDoc);
const expandedLayoutFieldKey = (templateField || layoutFielddKey) + "-layout[" + templateLayoutDoc[Id] + params + "]";
let expandedTemplateLayout = targetDoc?.[expandedLayoutFieldKey];