提交 dd25ba84 编写于 作者: S Sandeep Somavarapu

Fix #43479

上级 e799fab8
......@@ -197,8 +197,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic
switchSettings(target: ConfigurationTarget, resource: URI): TPromise<void> {
const activeEditor = this.editorService.getActiveEditor();
const activeEditorInput = activeEditor.input;
if (activeEditorInput instanceof PreferencesEditorInput) {
if (activeEditor && activeEditor.input instanceof PreferencesEditorInput) {
return this.getOrCreateEditableSettingsEditorInput(target, this.getEditableSettingsURI(target, resource))
.then(toInput => {
const replaceWith = new PreferencesEditorInput(this.getPreferencesEditorInputName(target, resource), toInput.getDescription(), this.instantiationService.createInstance(DefaultPreferencesEditorInput, this.getDefaultSettingsResource(target)), toInput);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册