diff --git a/apps/extension/src/hooks/popup-ready.ts b/apps/extension/src/hooks/popup-ready.ts index f385f0c9..ebcca4c4 100644 --- a/apps/extension/src/hooks/popup-ready.ts +++ b/apps/extension/src/hooks/popup-ready.ts @@ -5,13 +5,13 @@ type IsReady = boolean | undefined; // signals that react is ready (mounted) to service worker export const usePopupReady = (isReady: IsReady = undefined) => { - const sentMessagedRef = useRef(new Set()); + const sentMessagesRef = useRef(new Set()); const searchParams = new URLSearchParams(window.location.search); const popupId = searchParams.get('popupId'); useEffect(() => { - if (popupId && (isReady === undefined || isReady) && !sentMessagedRef.current.has(popupId)) { - sentMessagedRef.current.add(popupId); + if (popupId && (isReady === undefined || isReady) && !sentMessagesRef.current.has(popupId)) { + sentMessagesRef.current.add(popupId); void chrome.runtime.sendMessage({ type: PopupType.Ready,