From fdf7de29f08503d234c000232a6b940c7723998c Mon Sep 17 00:00:00 2001 From: rcourtman Date: Tue, 2 Dec 2025 20:37:44 +0000 Subject: [PATCH] fix: Resolve TypeScript errors in StackedMemoryBar and Settings StackedMemoryBar.tsx: - Fixed 'props.balloon' possibly undefined error by adding fallback to second comparison in Show condition Settings.tsx: - Fixed 'systemSettings' scope error by using updateChannel() signal instead of referencing out-of-scope variable from previous try block Both files now pass strict TypeScript checks. --- frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx | 2 +- frontend-modern/src/components/Settings/Settings.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx b/frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx index 7c4103d..11550ce 100644 --- a/frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx +++ b/frontend-modern/src/components/Dashboard/StackedMemoryBar.tsx @@ -199,7 +199,7 @@ export function StackedMemoryBar(props: StackedMemoryBarProps) { - 0 && props.balloon < props.total}> + 0 && (props.balloon || 0) < props.total}>
Balloon Limit diff --git a/frontend-modern/src/components/Settings/Settings.tsx b/frontend-modern/src/components/Settings/Settings.tsx index d64b72c..7a97e99 100644 --- a/frontend-modern/src/components/Settings/Settings.tsx +++ b/frontend-modern/src/components/Settings/Settings.tsx @@ -2043,7 +2043,8 @@ const Settings: Component = (props) => { updateStore.checkForUpdates(); // This will load version info too // Only use version.channel as fallback if user hasn't configured a preference // The user's saved updateChannel preference should take priority - if (version.channel && !systemSettings.updateChannel) { + // Check the signal value since systemSettings is scoped to the previous try block + if (version.channel && !updateChannel()) { setUpdateChannel(version.channel as 'stable' | 'rc'); } } catch (error) {