aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx4
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}`);
}