From 22e1a8cc057b88ce50df2e910b2b63811a4315e4 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Sun, 14 Sep 2025 19:34:32 -0500 Subject: [PATCH] Fix: "ReferenceError: setIsInitialized is not defined" when logging into web ui. --- frontend/src/hooks/useSmartLogos.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/hooks/useSmartLogos.jsx b/frontend/src/hooks/useSmartLogos.jsx index a500a530..148aded0 100644 --- a/frontend/src/hooks/useSmartLogos.jsx +++ b/frontend/src/hooks/useSmartLogos.jsx @@ -42,6 +42,7 @@ export const useLogoSelection = () => { * (unused + channel-used, excluding VOD-only logos) */ export const useChannelLogoSelection = () => { + const [isInitialized, setIsInitialized] = useState(false); const channelLogos = useLogosStore((s) => s.channelLogos); const hasLoadedChannelLogos = useLogosStore((s) => s.hasLoadedChannelLogos); const backgroundLoading = useLogosStore((s) => s.backgroundLoading); @@ -56,7 +57,7 @@ export const useChannelLogoSelection = () => { return; } - if (hasLoadedChannelLogos && hasLogos) { + if ((hasLoadedChannelLogos && hasLogos) || isInitialized) { return; } @@ -71,6 +72,7 @@ export const useChannelLogoSelection = () => { hasLoadedChannelLogos, hasLogos, fetchChannelAssignableLogos, + isInitialized, ]); return {