diff --git a/CHANGELOG.md b/CHANGELOG.md index a70024d3..1cde44e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +## [4.2.4] + +I won't even mention the change here.. Let's see how it works out. + ## [4.2.3] - 2022-07-22 ### Added diff --git a/src/util/ResolveRule.ts b/src/util/ResolveRule.ts index 58869f2d..42a784ae 100644 --- a/src/util/ResolveRule.ts +++ b/src/util/ResolveRule.ts @@ -58,6 +58,9 @@ async function _mapAllStringsAsync( return value; case 'string': { let prevMappedValue = await mapperFunc(value, parent); + /* this check is a hack. at this point we cannot assume that mapperFunc resolves variables only with '$'. + * but good enough for now. Should saves some resources. https://xkcd.com/1691/ */ + if (typeof prevMappedValue === 'string' && prevMappedValue.indexOf('$') === -1) return prevMappedValue; let nextMappedValue = await mapperFunc(prevMappedValue, parent); while (prevMappedValue !== (nextMappedValue = await mapperFunc(prevMappedValue, parent))) { prevMappedValue = nextMappedValue;