Fixed a bug in the DomainContext.jsx

This commit is contained in:
2023-01-01 20:26:08 +01:00
parent fc49c754fa
commit 4c0005d66c

View File

@ -21,6 +21,7 @@ export const DomainProvider = (props) => {
}, []);
useEffect(() => {
if (domains.length === 0) return;
if (!domains.includes(currentDomain))
updateCurrentDomain(domains.length !== 0 ? domains[0] : window.location.host);
}, [domains]);