Closed
Description
Bug when using v4.4.0
We use a pattern where we add properties to a string object. When we try to merge that string property into another object, all the properties originally added are dropped.
I'm not sure if this is specifically an issue with merge, or if other functions are affected.
> var testStr = new String('testStr');
> testStr.prop1 = 'testStr.prop1'
> testStr
{ [String: 'testStr'] prop1: 'testStr.prop1' }
// It seems to work 1 level deep.
> _.merge({}, { testStr: testStr })
{ testStr: { [String: 'testStr'] prop1: 'testStr.prop1' } }
// but any deeper and it doesn't work as expected.
> _.merge({}, { testStr: { testStr: testStr } })
{ testStr: { testStr: [String: 'testStr'] } }