Skip to content

Commit a6fb46a

Browse files
committed
fix(index): only use non-instance objects for overriding
1 parent 7045395 commit a6fb46a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function assign(current, addition, property: string = 'config', style: 'a
1212
else if (Array.isArray(addition)) {
1313
return addition.slice()
1414
}
15-
else if (typeof addition === 'object') {
15+
else if (typeof addition === 'object' && (addition.constructor.name === 'Object' || !addition.constructor.name)) {
1616
if (typeof current !== 'object' || addition['_literalReplace']) {
1717
if (addition['_literalReplace'])
1818
delete addition['_literalReplace']

0 commit comments

Comments
 (0)