don't log extension events when not connected

This commit is contained in:
antelle 2021-05-08 11:46:53 +02:00
parent 2d6d3658a1
commit aa729d9af8
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 5 additions and 1 deletions

View File

@ -153,6 +153,10 @@ const BrowserExtensionConnector = {
return;
}
if (!connections.has(WebConnectionInfo.connectionId)) {
connections.set(WebConnectionInfo.connectionId, WebConnectionInfo);
}
processingBrowserMessage = true;
const request = pendingBrowserMessages.shift();
@ -185,7 +189,7 @@ const BrowserExtensionConnector = {
},
sendEvent(data) {
if (!this.isEnabled()) {
if (!this.isEnabled() || !connections.size) {
return;
}
if (Launcher) {