Skip to content

Commit

Permalink
Recover when 'documentPaste' API is not properly registered.
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Grunberg <[email protected]>
  • Loading branch information
rgrunber committed Mar 29, 2023
1 parent 90477f8 commit cab4f38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/standardLanguageClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@ export class StandardLanguageClient {
await onExtensionChange(extensions.all);
});
}

registerPasteEventHandler(context, this.languageClient);
try {
registerPasteEventHandler(context, this.languageClient);
} catch (error) {
// clients may not have properly configured documentPaste
logger.error(error);
}
activationProgressNotification.hide();
if (!hasImported) {
showImportFinishNotification(context);
Expand Down

0 comments on commit cab4f38

Please sign in to comment.