File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/vs/editor/common/config Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -854,16 +854,16 @@ export class ApplyUpdateResult<T> {
854854}
855855
856856function applyUpdate < T > ( value : T , update : T ) : ApplyUpdateResult < T > {
857- if ( typeof value !== 'object' || typeof update !== 'object' ) {
858- return new ApplyUpdateResult ( update , value = == update ) ;
857+ if ( typeof value !== 'object' || typeof update !== 'object' || ! value || ! update ) {
858+ return new ApplyUpdateResult ( update , value ! == update ) ;
859859 }
860860 if ( Array . isArray ( value ) || Array . isArray ( update ) ) {
861861 const arrayEquals = Array . isArray ( value ) && Array . isArray ( update ) && arrays . equals ( value , update ) ;
862862 return new ApplyUpdateResult ( update , arrayEquals ) ;
863863 }
864864 let didChange = false ;
865865 for ( let key in update ) {
866- if ( ( value as T & object ) . hasOwnProperty ( key ) ) {
866+ if ( ( update as T & object ) . hasOwnProperty ( key ) ) {
867867 const result = applyUpdate ( value [ key ] , update [ key ] ) ;
868868 if ( result . didChange ) {
869869 value [ key ] = result . newValue ;
You can’t perform that action at this time.
0 commit comments