Skip to content

Commit aa546cc

Browse files
committed
fixed backwards compatibility for toPath
1 parent f674dd9 commit aa546cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/toPath.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var pathArray;
1212
function toPath(_json, delimiter) {
1313
pathArray = [];
1414

15-
delimiter = delimiter || '.';
15+
delimiter = delimiter || '/';
1616

1717
if (!json.check('object', _json)) {
1818
return []

test/toPath.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('toPath.js', function () {
3030
two: ['hallo']
3131
};
3232

33-
pathArray = base.toPath(jsonObj, '/');
33+
pathArray = base.toPath(jsonObj);
3434

3535
expect(pathArray[0]).to.equal('one');
3636
expect(pathArray[1]).to.equal('one/two');

0 commit comments

Comments
 (0)