Skip to content

Commit

Permalink
init the array
Browse files Browse the repository at this point in the history
  • Loading branch information
s3u committed Dec 2, 2011
1 parent b1427b1 commit f8ac2de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/jsonpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function jsonPath(obj, expr, arg) {
else {
if(_.isArray(v) && P.flatten) {
if(!P.result) P.result = [];
if(!_.isArray(P.result)) P.result = [P.result];
P.result = P.result.concat(v);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"email": "mike@brevoort.com"
}
],
"version": "0.8.4",
"version": "0.8.5",
"repository": {
"type": "git",
"url": "git://github.com/s3u/JSONPath.git"
Expand Down

0 comments on commit f8ac2de

Please sign in to comment.