File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,15 @@ function isObject(o) {
95
95
function extend ( ...args ) {
96
96
const to = Object ( args [ 0 ] ) ;
97
97
const noExtend = [ '__proto__' , 'constructor' , 'prototype' ] ;
98
+ // eslint-disable-next-line
99
+ const HTMLElement = typeof window !== 'undefined' ? window . HTMLElement : undefined ;
98
100
for ( let i = 1 ; i < args . length ; i += 1 ) {
99
101
const nextSource = args [ i ] ;
100
- if ( nextSource !== undefined && nextSource !== null ) {
102
+ if (
103
+ nextSource !== undefined &&
104
+ nextSource !== null &&
105
+ ! ( HTMLElement && nextSource instanceof HTMLElement )
106
+ ) {
101
107
const keysArray = Object . keys ( Object ( nextSource ) ) . filter ( ( key ) => noExtend . indexOf ( key ) < 0 ) ;
102
108
for ( let nextIndex = 0 , len = keysArray . length ; nextIndex < len ; nextIndex += 1 ) {
103
109
const nextKey = keysArray [ nextIndex ] ;
You can’t perform that action at this time.
0 commit comments