Fixed a bug in the DomainContext.jsx
This commit is contained in:
@ -21,6 +21,7 @@ export const DomainProvider = (props) => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (domains.length === 0) return;
|
||||||
if (!domains.includes(currentDomain))
|
if (!domains.includes(currentDomain))
|
||||||
updateCurrentDomain(domains.length !== 0 ? domains[0] : window.location.host);
|
updateCurrentDomain(domains.length !== 0 ? domains[0] : window.location.host);
|
||||||
}, [domains]);
|
}, [domains]);
|
||||||
|
Reference in New Issue
Block a user