From d091503f19a01b3178e3b90f2a5ba6ca6d367c74 Mon Sep 17 00:00:00 2001 From: Thibaut Valentin Date: Fri, 20 Mar 2026 16:10:59 +0100 Subject: [PATCH] fix: clear pub aff when no cat select --- src/main/webapp/src/pages/competition/editor/CMTMatchPanel.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/webapp/src/pages/competition/editor/CMTMatchPanel.jsx b/src/main/webapp/src/pages/competition/editor/CMTMatchPanel.jsx index feef8ab..2266118 100644 --- a/src/main/webapp/src/pages/competition/editor/CMTMatchPanel.jsx +++ b/src/main/webapp/src/pages/competition/editor/CMTMatchPanel.jsx @@ -41,6 +41,7 @@ export function CategorieSelect({catId, setCatId, menuActions}) { const setLoading = useLoadingSwitcher() const {data: cats, setData: setCats} = useRequestWS('getAllCategory', {}, setLoading); const {dispatch} = useWS(); + const publicAffDispatch = usePubAffDispatch(); const {connected, setText} = useOBS(); const {t} = useTranslation("cm"); @@ -70,6 +71,8 @@ export function CategorieSelect({catId, setCatId, menuActions}) { useEffect(() => { setText("poule", cat ? cat.name : ""); + if (!cat) + publicAffDispatch({type: 'SET_DATA', payload: {c1: undefined, c2: undefined, next: []}}); }, [cat, connected]); return <> -- 2.49.0