diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-05-08 04:14:49 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-05-08 04:14:49 -0400 |
commit | 2e7d3ec952ec88a928f22b8d7a708cc807d9ecdd (patch) | |
tree | 7c748e31a7d91caaaab06ec96fd0419d0aea572f /src | |
parent | 920b4ec7a51e88769940b619c1b90b230b353ccb (diff) |
c
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index d84dd33ff..db7bf8c43 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -302,7 +302,7 @@ export class CollectionSchemaView extends CollectionSubView() { addNewKey = (key: string, defaultVal: any) => { if (this._newFieldType == ColumnType.Equation) { this.childDocs.forEach(doc => { - const eq = this.parseEquation(defaultVal, doc); + const eq = this.parseEquation(defaultVal); doc[DocData][key] = this.parsedEquationResult(eq, doc); this.setupAutoUpdate(eq, doc); }); @@ -321,7 +321,7 @@ export class CollectionSchemaView extends CollectionSubView() { }); } - parseEquation = (eq: string, doc: Doc): string => { + parseEquation = (eq: string): string => { const variablePattern = /[a-z]+/gi; return eq.replace(variablePattern, (match) => `doc.${match}`); } |