Skip to content

Commit

Permalink
[+] unwanted popups: preventing actionWindow popups to be created
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoHMZ committed Jan 4, 2025
1 parent ea2ecf2 commit 0fbd58f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/_contexts/Game.context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export const GameProvider = ({ children }: { children: ReactNode }) => {
const promptState = gameState.players?.[user.id].promptState;
const { buttons, menuTitle, promptUuid, selectCard, promptType } =
promptState;
if (buttons.length > 0 && menuTitle && promptUuid && !selectCard) {
if (promptType === 'actionWindow') return;
else if (buttons.length > 0 && menuTitle && promptUuid && !selectCard) {
openPopup('default', {
uuid: promptUuid,
title: menuTitle,
Expand Down

0 comments on commit 0fbd58f

Please sign in to comment.