Skip to content

Commit

Permalink
src: Fix dependancy loop whenever an error was trigged by extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
SludgeGirl committed Feb 19, 2025
1 parent 38bb64e commit 485e976
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const Application = () => {
email: "",
});
const [errors, setErrors] = useState<Notification[]>([]);
const [loadedSubscriptions, setLoadedSubscriptions] = useState<boolean>(false);

const Dialogs = useDialogs();

Expand Down Expand Up @@ -89,8 +90,11 @@ export const Application = () => {
}, [backend, setLoadingSubscriptions, setSubscriptions, setUnregisteredSubscriptions, setLoadingExtensions, errors]);

useEffect(() => {
updateSubscriptions();
}, [updateSubscriptions, backend]);
if (!loadedSubscriptions && backend !== null) {
setLoadedSubscriptions(true);
updateSubscriptions();
}
}, [updateSubscriptions, loadedSubscriptions, setLoadingExtensions, backend]);

const registerProduct = useCallback(async (): Promise<[boolean, string]> => {
console.debug("registering", formData);
Expand Down

0 comments on commit 485e976

Please sign in to comment.