From 64a73f99a3e7b05c5afe92abaeb4b96373c5c00b Mon Sep 17 00:00:00 2001 From: eyelidlessness Date: Fri, 4 Aug 2023 10:48:59 -0700 Subject: [PATCH] Address lint errors --- src/js/form-model.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/js/form-model.js b/src/js/form-model.js index d7138772..e216e5a5 100644 --- a/src/js/form-model.js +++ b/src/js/form-model.js @@ -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); @@ -1440,11 +1441,12 @@ FormModel.prototype.evaluate = function ( expr = expr.replace(/</g, '<'); expr = expr.replace(/>/g, '>'); expr = expr.replace(/"/g, '"'); + if (cacheable) { - this.convertedExpressions.set(cacheKey,expr); + this.convertedExpressions.set(cacheKey, expr); } } else { - expr = cached_expr; + expr = cachedExpr; } resultTypes = {