Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ function deepmergeConstructor (options) {
: Object.keys

function isMergeableObject (value) {
return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date)
return typeof value === 'object' && value !== null && !(value instanceof RegExp) && !(value instanceof Date) && !(value instanceof Buffer)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have the same issue with Stream objects

}

function isPrimitive (value) {
return typeof value !== 'object' || value === null
}

function isPrimitiveOrBuiltIn (value) {
return typeof value !== 'object' || value === null || value instanceof RegExp || value instanceof Date
return typeof value !== 'object' || value === null || value instanceof RegExp || value instanceof Date || value instanceof Buffer
}

const mergeArray = options && typeof options.mergeArray === 'function'
Expand Down