Skip to content

Commit b023cac

Browse files
committed
push a workaround for microsoft#122990
1 parent 5f697ad commit b023cac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/services/editor/browser/editorOverrideService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export class EditorOverrideService extends Disposable implements IEditorOverride
373373
const currentEditor = firstOrDefault(group.findEditors(resource));
374374
// If untitled, we want all contribution points
375375
let contributionPoints = resource.scheme === Schemas.untitled ? distinct(flatten(Array.from(this._contributionPoints.values())), (contrib) => contrib.editorInfo.id) : this.findMatchingContributions(resource);
376-
const defaultSetting = this.getAssociationsForResource(resource)[0].viewType;
376+
const defaultSetting = this.getAssociationsForResource(resource)[0]?.viewType;
377377
// Not the most efficient way to do this, but we want to ensure the text editor is at the top of the quickpick
378378
contributionPoints = contributionPoints.sort((a, b) => {
379379
if (a.editorInfo.id === DEFAULT_EDITOR_ASSOCIATION.id) {

0 commit comments

Comments
 (0)