Make baseGet align with baseSet.

This commit is contained in:
John-David Dalton
2015-07-24 08:20:30 -07:00
parent 4520e0710d
commit a730fe13c7
2 changed files with 13 additions and 16 deletions

View File

@@ -12934,9 +12934,9 @@
});
});
test('`_.' + methodName + '` should coerce array paths to strings', 1, function() {
test('`_.' + methodName + '` should not coerce array paths to strings', 1, function() {
var object = { 'a,b,c': 3, 'a': { 'b': { 'c': 4 } } };
strictEqual(func(object, ['a', 'b', 'c']), 3);
strictEqual(func(object, ['a', 'b', 'c']), 4);
});
test('`_.' + methodName + '` should ignore empty brackets', 1, function() {
@@ -13436,10 +13436,10 @@
});
});
test('should coerce array paths to strings', 1, function() {
test('should not coerce array paths to strings', 1, function() {
var object = { 'a,b,c': 3, 'a': { 'b': { 'c': 3 } } };
_.set(object, ['a', 'b', 'c'], 4);
deepEqual(object, { 'a,b,c': 4, 'a': { 'b': { 'c': 3 } } });
strictEqual(object.a.b.c, 4);
});
test('should ignore empty brackets', 1, function() {