File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,12 @@ function isNode(node) {
102102}
103103function extend ( ...args ) {
104104 const to = Object ( args [ 0 ] ) ;
105- const noExtend = [ '__proto__' , 'constructor' , 'prototype' ] ;
106105 for ( let i = 1 ; i < args . length ; i += 1 ) {
107106 const nextSource = args [ i ] ;
108107 if ( nextSource !== undefined && nextSource !== null && ! isNode ( nextSource ) ) {
109- const keysArray = Object . keys ( Object ( nextSource ) ) . filter ( ( key ) => noExtend . indexOf ( key ) < 0 ) ;
108+ const keysArray = Object . keys ( Object ( nextSource ) ) . filter (
109+ ( key ) => key !== '__proto__' && key !== 'constructor' && key !== 'prototype' ,
110+ ) ;
110111 for ( let nextIndex = 0 , len = keysArray . length ; nextIndex < len ; nextIndex += 1 ) {
111112 const nextKey = keysArray [ nextIndex ] ;
112113 const desc = Object . getOwnPropertyDescriptor ( nextSource , nextKey ) ;
You can’t perform that action at this time.
0 commit comments