Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMHasperhoven committed Aug 23, 2024
1 parent ccd44ae commit 7e7355b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/extension/src/hooks/popup-ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7e7355b

Please sign in to comment.