Skip to content

Commit

Permalink
Merge pull request #161 from brian-learningpool/issue/160
Browse files Browse the repository at this point in the history
Resolves #160, corrects issue with _getobj()
  • Loading branch information
FlorianTolk authored Jan 16, 2020
2 parents cae3e2c + 5a6e39b commit 1f1a610
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xapistatement.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
if( !obj[part] ){
if( /\[\]$/.test(part) ){
part = part.slice(0,-2);
obj[part] = [];
if (!Array.isArray(obj[part])) {
obj[part] = [];
}
}
else
obj[part] = {};
Expand Down

0 comments on commit 1f1a610

Please sign in to comment.