Closed rakhmanoff closed 3 years ago
It should work if you set the clone
option to false
.
const deepMergeResultsWithArrayBuffer = deepmerge(regularObject, objectWithArrayBuffer, { clone: false });
clone: false
option works, thanks. According to the docs (clone option) it is deprecated. Do you plan to delete it in the future version and set value to the current default value true
, so this functionality won't be supported anymore?
Currently the plan for the clone
option is to undeprecate it and make false
the default behavior.
I'd also recommend setting the isMergeableObject
option to the is-plain-object
function. This is also planned to become the default behavior in the next version.
Thank you for the information!
Issue type: bug
Hello,
I've used ngrx-store-localstorage package for my Angular application, it depends on deepmerge functionality.
Bug description: If one of the source objects contains a field with type "ArrayBuffer", it will be replaced with an empty object in resulting object. It is an unexpected behaviour. If I use
Object.assign
for the same action, then field with ArrayBuffer preserves, it is expected.I've created a simple JSFiddle with an example: https://jsfiddle.net/2bat0oeh/17/ Also you can see the code and results right here:
Results from console: