diff --git a/src/frontend/src/components/inputGlobalComponent/index.tsx b/src/frontend/src/components/inputGlobalComponent/index.tsx index 3f74d2c1d..92e24f42b 100644 --- a/src/frontend/src/components/inputGlobalComponent/index.tsx +++ b/src/frontend/src/components/inputGlobalComponent/index.tsx @@ -34,8 +34,8 @@ export default function InputGlobalComponent({ useEffect(() => { if (data) if ( - globalVariablesEntries && - !globalVariablesEntries.includes(data.value) && + ((globalVariablesEntries && + !globalVariablesEntries.includes(data.value))||!globalVariablesEntries) && data.load_from_db ) { setTimeout(() => { @@ -43,7 +43,7 @@ export default function InputGlobalComponent({ setDb(false); }, 100); } - }, [globalVariablesEntries]); + }, [globalVariablesEntries,data]); useEffect(() => { if (!data.value && data.display_name) {