@rhinostone/swig-twig 2.7.1 → 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.
Files changed (2) hide show
  1. package/lib/parser.js +5 -0
  2. package/package.json +2 -2
package/lib/parser.js CHANGED
@@ -244,6 +244,11 @@ exports.parseExpr = function (tokens, filters, _posOut) {
244
244
  bail('Invalid filter "' + fname + '"');
245
245
  }
246
246
  var fargs;
247
+ // `fargs` must be reset each iteration — `var` is function-scoped
248
+ // (a bare declaration does not reset it), so without this an
249
+ // arg-bearing filter earlier in the chain would leak its args onto
250
+ // a later no-arg filter (e.g. `x|default("y")|upper`).
251
+ fargs = undefined;
247
252
  if (tok.type === _t.FILTER) {
248
253
  fargs = parseArgList(_t.PARENCLOSE);
249
254
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinostone/swig-twig",
3
- "version": "2.7.1",
3
+ "version": "2.7.3",
4
4
  "description": "Twig-syntax frontend for the @rhinostone/swig-core template engine. Part of the @rhinostone/swig multi-flavor family.",
5
5
  "keywords": [
6
6
  "template",
@@ -22,7 +22,7 @@
22
22
  "node": ">=12"
23
23
  },
24
24
  "peerDependencies": {
25
- "@rhinostone/swig-core": "2.7.1"
25
+ "@rhinostone/swig-core": "2.7.3"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"