From 498b4af3bedf06b7c30b63855a1a93b7bef535dc Mon Sep 17 00:00:00 2001 From: Cesar Gonzalez Date: Wed, 26 Jun 2024 08:29:53 -0500 Subject: [PATCH] [PM-5189] Fixing a missed promise reference within OverlayBackground --- .../background/abstractions/overlay.background.ts | 2 +- apps/browser/src/autofill/background/tabs.background.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/browser/src/autofill/background/abstractions/overlay.background.ts b/apps/browser/src/autofill/background/abstractions/overlay.background.ts index b1b06e4615..64f01a47ed 100644 --- a/apps/browser/src/autofill/background/abstractions/overlay.background.ts +++ b/apps/browser/src/autofill/background/abstractions/overlay.background.ts @@ -173,5 +173,5 @@ export type InlineMenuListPortMessageHandlers = { export interface OverlayBackground { init(): Promise; removePageDetails(tabId: number): void; - updateOverlayCiphers(): void; + updateOverlayCiphers(): Promise; } diff --git a/apps/browser/src/autofill/background/tabs.background.ts b/apps/browser/src/autofill/background/tabs.background.ts index 7174aba2ee..f8666a0d6b 100644 --- a/apps/browser/src/autofill/background/tabs.background.ts +++ b/apps/browser/src/autofill/background/tabs.background.ts @@ -94,7 +94,7 @@ export default class TabsBackground { return; } - this.overlayBackground.updateOverlayCiphers(); + await this.overlayBackground.updateOverlayCiphers(); if (this.main.onUpdatedRan) { return; @@ -121,7 +121,10 @@ export default class TabsBackground { * for the current tab. Also updates the overlay ciphers. */ private updateCurrentTabData = async () => { - this.overlayBackground.updateOverlayCiphers(); - await Promise.all([this.main.refreshBadge(), this.main.refreshMenu()]); + await Promise.all([ + this.main.refreshBadge(), + this.main.refreshMenu(), + this.overlayBackground.updateOverlayCiphers(), + ]); }; }