-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
$eval() - array inputs should be wrapped
The logic for handling the second parameter to this function should be the same as for handling the input to any expression. This includes wrapping a top level array input in a singleton sequence so it gets treated as a single input. This code was missing from this function and is added here. Signed-off-by: andrew-coleman <[email protected]>
- Loading branch information
1 parent
27724d9
commit ca3070f
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[ | ||
{ | ||
"expr": "$eval(\"{ 'test': 1 }\", [])", | ||
"data": {}, | ||
"bindings": {}, | ||
"result": { | ||
"test": 1 | ||
} | ||
}, | ||
{ | ||
"expr": "$eval(\"{ 'test': 1 }\")", | ||
"data": [], | ||
"bindings": {}, | ||
"result": { | ||
"test": 1 | ||
} | ||
}, | ||
{ | ||
"expr": "$eval(\"{ 'test': 1 }\", [1,2,3])", | ||
"data": [], | ||
"bindings": {}, | ||
"result": { | ||
"test": 1 | ||
} | ||
}, | ||
{ | ||
"expr": "$eval(\"{ 'test': 1 }\")", | ||
"data": [1,2,3], | ||
"bindings": {}, | ||
"result": { | ||
"test": 1 | ||
} | ||
} | ||
] |