Skip to content

Commit

Permalink
Fix #42766 - Don't throw on absent workspace settings
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Feb 1, 2018
1 parent d233df9 commit d272072
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,15 @@ class PreferencesRenderersController extends Disposable {
});
}

private async getPreferencesEditorModel(target: SettingsTarget): TPromise<ISettingsEditorModel> {
private async getPreferencesEditorModel(target: SettingsTarget): TPromise<ISettingsEditorModel | null> {
const resource = target === ConfigurationTarget.USER ? this.preferencesService.userSettingsResource :
target === ConfigurationTarget.WORKSPACE ? this.preferencesService.workspaceSettingsResource :
target;

if (!resource) {
return null;
}

const targetKey = resource.toString();
if (!this._prefsModelsForSearch.has(targetKey)) {
try {
Expand Down

0 comments on commit d272072

Please sign in to comment.