Fix for issue 102 by tejodorus · Pull Request #138 · JSONPath-Plus/JSONPath · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion badges/tests-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dist/index-browser-esm.js
2 changes: 1 addition & 1 deletion dist/index-browser-esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-browser-esm.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-browser-umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@
return !match || !match[1] ? exp : subx[match[1]];
});
cache[expr] = exprList;
return cache[expr];
return cache[expr].concat();
};

/**
Expand Down
2 changes: 1 addition & 1 deletion dist/index-browser-umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-browser-umd.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-node-cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ JSONPath.toPathArray = function (expr) {
return !match || !match[1] ? exp : subx[match[1]];
});
cache[expr] = exprList;
return cache[expr];
return cache[expr].concat();
};

JSONPath.prototype.vm = vm__default['default'];
Expand Down
2 changes: 1 addition & 1 deletion dist/index-node-esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ JSONPath.toPathArray = function (expr) {
return !match || !match[1] ? exp : subx[match[1]];
});
cache[expr] = exprList;
return cache[expr];
return cache[expr].concat();
};

JSONPath.prototype.vm = vm;
Expand Down
2 changes: 1 addition & 1 deletion src/jsonpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ JSONPath.toPathArray = function (expr) {
return !match || !match[1] ? exp : subx[match[1]];
});
cache[expr] = exprList;
return cache[expr];
return cache[expr].concat();
};

export {JSONPath};
15 changes: 15 additions & 0 deletions test/test.toPath.js