Skip to content

Commit a78af4e

Browse files
committed
Fixes test failures.
1 parent 469043a commit a78af4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/editor/common/config/editorOptions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -854,16 +854,16 @@ export class ApplyUpdateResult<T> {
854854
}
855855

856856
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);
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;

0 commit comments

Comments
 (0)