Skip to content

Commit

Permalink
fix: do not try to open unsupported file
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jun 7, 2023
1 parent 67b6023 commit db89b84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service-override/tools/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function wrapOpenEditor (textModelService: ITextModelService, defaultBeha

const resource = isResourceEditorInput(editor) || isEditorInput(editor) ? editor.resource : undefined

if (resource == null) {
if (resource == null || !textModelService.canHandleResource(resource)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return defaultBehavior(editor as any, optionsOrPreferredGroup as any, preferredGroup)
}
Expand Down

0 comments on commit db89b84

Please sign in to comment.