Skip to content

Commit 2a57053

Browse files
committed
- Fix (unpublished regression): value retrieval in sandbox
1 parent 7443baa commit 2a57053

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/jsonpath.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ const vm = JSONPath.nodeVMSupported
5858
moveToAnotherArray(keys, funcs, (key) => {
5959
return typeof context[key] === 'function';
6060
});
61-
const values = Object.values(context);
61+
const values = keys.map((vr, i) => {
62+
return context[vr];
63+
});
64+
6265
const funcString = funcs.reduce((s, func) => {
6366
let fString = context[func].toString();
6467
if (!(/function/u).exec(fString)) {

0 commit comments

Comments
 (0)