@rhinostone/swig-core 2.7.2 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tokenparser.js +5 -0
- package/package.json +1 -1
package/lib/tokenparser.js
CHANGED
|
@@ -591,6 +591,11 @@ TokenParser.prototype = {
|
|
|
591
591
|
bail('Invalid filter "' + fname + '"');
|
|
592
592
|
}
|
|
593
593
|
var fargs;
|
|
594
|
+
// `fargs` must be reset each iteration — `var` is function-scoped
|
|
595
|
+
// (a bare declaration does not reset it), so without this an
|
|
596
|
+
// arg-bearing filter earlier in the chain would leak its args onto
|
|
597
|
+
// a later no-arg filter (e.g. `x|replace("a","b")|upper`).
|
|
598
|
+
fargs = undefined;
|
|
594
599
|
if (tok.type === _t.FILTER) {
|
|
595
600
|
fargs = parseArgList(_t.PARENCLOSE);
|
|
596
601
|
}
|