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> {
854
854
}
855
855
856
856
function 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 ) ;
859
859
}
860
860
if ( Array . isArray ( value ) || Array . isArray ( update ) ) {
861
861
const arrayEquals = Array . isArray ( value ) && Array . isArray ( update ) && arrays . equals ( value , update ) ;
862
862
return new ApplyUpdateResult ( update , arrayEquals ) ;
863
863
}
864
864
let didChange = false ;
865
865
for ( let key in update ) {
866
- if ( ( value as T & object ) . hasOwnProperty ( key ) ) {
866
+ if ( ( update as T & object ) . hasOwnProperty ( key ) ) {
867
867
const result = applyUpdate ( value [ key ] , update [ key ] ) ;
868
868
if ( result . didChange ) {
869
869
value [ key ] = result . newValue ;
You can’t perform that action at this time.
0 commit comments