Skip to content

Commit bc6cf27

Browse files
committed
1 parent 0fbe44a commit bc6cf27

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/vs/platform/configuration/common/configuration.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,12 @@ export function addToValueTree(settingsTreeRoot: any, key: string, value: any, c
265265
curr = obj;
266266
}
267267

268-
if (typeof curr === 'object') {
269-
curr[last] = value; // workaround https://github.com/Microsoft/vscode/issues/13606
268+
if (typeof curr === 'object' && curr !== null) {
269+
try {
270+
curr[last] = value; // workaround https://github.com/Microsoft/vscode/issues/13606
271+
} catch (e) {
272+
conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);
273+
}
270274
} else {
271275
conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);
272276
}

0 commit comments

Comments
 (0)