Skip to content

Commit

Permalink
Fix broken BG->UI comms in backups feature
Browse files Browse the repository at this point in the history
- arhghghg this took me hours to find
  • Loading branch information
poltak committed May 17, 2024
1 parent a3689a3 commit b1f9d1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backup-restore/background/procedures/ui-communication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export class ProcedureUiCommunication {
sendEvent(eventType, event) {
for (const tabId of Object.keys(this._uiTabIds)) {
try {
globalThis['browser'].tabs.sendMessage(parseInt(tabId, 10), {
const webExtAPIs = globalThis['browser'] ?? globalThis['chrome']
webExtAPIs.tabs.sendMessage(parseInt(tabId, 10), {
type: this.eventName,
event: { type: eventType, ...(event || {}) },
})
Expand Down

0 comments on commit b1f9d1f

Please sign in to comment.