Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
access data only once
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip authored Jul 12, 2023
1 parent 934d7eb commit 1c7385b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/form-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,8 @@ FormModel.prototype.evaluate = function (
cacheable = original === expr;

// if no cached conversion exists
if (!this.convertedExpressions.has(cacheKey)) {
cached_expr = this.convertedExpressions.get(cacheKey)
if (cached_expr === undefined) {
expr = expr.trim();
expr = this.replaceInstanceFn(expr);
expr = this.replaceVersionFn(expr);
Expand All @@ -1443,7 +1444,7 @@ FormModel.prototype.evaluate = function (
this.convertedExpressions.set(cacheKey,expr);
}
} else {
expr = this.convertedExpressions.get(cacheKey);
expr = cached_expr;
}

resultTypes = {
Expand Down

0 comments on commit 1c7385b

Please sign in to comment.