Skip to content

Commit

Permalink
Fix incorrect behavior for keys ending with a dot
Browse files Browse the repository at this point in the history
  • Loading branch information
GlennKintscher committed Mar 24, 2020
1 parent e909d1f commit 8deb5b1
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 8deb5b1

Please sign in to comment.