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

Commit

Permalink
Address lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eyelidlessness committed Aug 4, 2023
1 parent 1c7385b commit 64a73f9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/js/form-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -1424,8 +1424,9 @@ FormModel.prototype.evaluate = function (
cacheable = original === expr;

// if no cached conversion exists
cached_expr = this.convertedExpressions.get(cacheKey)
if (cached_expr === undefined) {
const cachedExpr = this.convertedExpressions.get(cacheKey);

if (cachedExpr === undefined) {
expr = expr.trim();
expr = this.replaceInstanceFn(expr);
expr = this.replaceVersionFn(expr);
Expand All @@ -1440,11 +1441,12 @@ FormModel.prototype.evaluate = function (
expr = expr.replace(/&lt;/g, '<');
expr = expr.replace(/&gt;/g, '>');
expr = expr.replace(/&quot;/g, '"');

if (cacheable) {
this.convertedExpressions.set(cacheKey,expr);
this.convertedExpressions.set(cacheKey, expr);
}
} else {
expr = cached_expr;
expr = cachedExpr;
}

resultTypes = {
Expand Down

0 comments on commit 64a73f9

Please sign in to comment.