Skip to content

Commit

Permalink
Make send return promise.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamuratak committed Nov 13, 2024
1 parent 78f21ec commit af16b58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions viewer/components/extensionconnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class ExtensionConnection {
}

send(message: ClientRequest) {
void this.connectionPort.send(message)
return this.connectionPort.send(message)
}

private setupDoms() {
Expand Down Expand Up @@ -47,7 +47,7 @@ export class ExtensionConnection {
pdfFileUri: this.lwApp.pdfFileUri,
viewer: (isEmbedded ? 'tab' : 'browser')
}
this.send(openPack)
void this.send(openPack)
void this.connectionPort.onDidReceiveMessage((event: MessageEvent<string>) => {
const data = JSON.parse(event.data) as ServerResponse
switch (data.type) {
Expand Down

0 comments on commit af16b58

Please sign in to comment.