Skip to content

Commit

Permalink
Merge pull request #1403 from telefonicaid/fix/jexl_extractVariables_…
Browse files Browse the repository at this point in the history
…access_bidireccional

check array access in jexlPlugin when bidirectionalPlugin (extractVariables)
  • Loading branch information
fgalan authored Jul 6, 2023
2 parents e0b54fa + 28dac0c commit 4591e7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Fix: check array access in extractVariables of jexlPlugin when bidirectionalPlugin is enabled
- Fix: explicitAttrs of device was tainted even if not defined
- Fix: do not include static, lazy and commands from group to device to avoid duplicate them in device (#1377)
- Add: Evaluate group entityNameExp with a context including measures (#1334)
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/jexlParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function extractVariables(expression) {
variables = tokens.filter(function (token, index, array) {
return (
(token.type === ' ' && array[index - 1].type !== 'dot') ||
(token.type === 'identifier' && array[index + 1].type !== 'openParen')
(token.type === 'identifier' && array[index + 1] && array[index + 1].type !== 'openParen')
);
});

Expand Down

0 comments on commit 4591e7f

Please sign in to comment.