Skip to content

Commit

Permalink
Prevent error when text document content provider returns empty string (
Browse files Browse the repository at this point in the history
  • Loading branch information
hyy215 authored Jul 29, 2022
1 parent 56190e6 commit d971520
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/plugin-ext/src/main/browser/workspace-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,8 @@ export class TextContentResource implements Resource {
return content;
} else {
const content = await this.proxy.$provideTextDocumentContent(this.uri.toString());
if (content) {
return content;
}
return content ?? '';
}

return Promise.reject(new Error(`Unable to get content for '${this.uri.toString()}'`));
}

dispose(): void {
Expand Down

0 comments on commit d971520

Please sign in to comment.