File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -657,15 +657,25 @@ function updateFile(fileName) {
657657 const key = keys [ i ] ;
658658 if ( ! isSafeKey ( key ) ) return false ;
659659 if ( ! Object . prototype . hasOwnProperty . call ( current , key ) || ! current [ key ] ) {
660- current [ key ] = Object . create ( null ) ;
660+ Object . defineProperty ( current , key , {
661+ value : Object . create ( null ) ,
662+ writable : true ,
663+ enumerable : true ,
664+ configurable : true
665+ } ) ;
661666 }
662667 current = current [ key ] ;
663668 }
664669 const lastKey = keys [ keys . length - 1 ] ;
665670 if ( ! isSafeKey ( lastKey ) ) return false ;
666- const existing = current [ lastKey ] ;
671+ const existing = Object . prototype . hasOwnProperty . call ( current , lastKey ) ? current [ lastKey ] : undefined ;
667672 if ( ! Object . prototype . hasOwnProperty . call ( current , lastKey ) || existing === englishValue ) {
668- current [ lastKey ] = value ;
673+ Object . defineProperty ( current , lastKey , {
674+ value : value ,
675+ writable : true ,
676+ enumerable : true ,
677+ configurable : true
678+ } ) ;
669679 return true ;
670680 }
671681 return false ;
You can’t perform that action at this time.
0 commit comments