Skip to content

Commit

Permalink
Merge pull request #21 from GlennKintscher/master
Browse files Browse the repository at this point in the history
Fix incorrect behavior for keys ending with a dot
  • Loading branch information
doowb committed Apr 1, 2020
2 parents e909d1f + 8deb5b1 commit 236f797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function split(path, options) {

for (let i = 0; i < keys.length; i++) {
let prop = keys[i];
while (prop && prop.slice(-1) === '\\' && keys[i + 1]) {
while (prop && prop.slice(-1) === '\\' && keys[i + 1] != null) {
prop = prop.slice(0, -1) + char + keys[++i];
}
res.push(prop);
Expand Down

0 comments on commit 236f797

Please sign in to comment.