Skip to content

Commit

Permalink
remove overwriting in cache with new indexing way
Browse files Browse the repository at this point in the history
  • Loading branch information
JhontSouth committed Mar 14, 2023
1 parent 12d2579 commit f8e61c8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ export const validateExpressions: ValidateFunc = (
let errorMessage = '';
let warningMessage = '';
try {
newCache[value] = cache?.[value] ? cache[value] : checkExpression(value, required, types);
errorMessage = checkReturnType(newCache[value], types);
const cacheKey = types.length > 1 ? value : `${value}.${types[0]}`;
newCache[cacheKey] = cache?.[cacheKey] ? cache[cacheKey] : checkExpression(value, required, types);
errorMessage = checkReturnType(newCache[cacheKey], types);
} catch (error) {
//change the missing custom function error to warning
warningMessage = filterCustomFunctionError(error.message, customFunctions);
Expand Down

0 comments on commit f8e61c8

Please sign in to comment.