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.
This commit is contained in:
rcourtman 2025-12-02 20:37:44 +00:00
parent 282a323c10
commit fdf7de29f0
2 changed files with 3 additions and 2 deletions

View file

@ -199,7 +199,7 @@ export function StackedMemoryBar(props: StackedMemoryBarProps) {
</span>
</div>
<Show when={(props.balloon || 0) > 0 && props.balloon < props.total}>
<Show when={(props.balloon || 0) > 0 && (props.balloon || 0) < props.total}>
<div class="flex justify-between gap-3 py-0.5 border-t border-gray-700/50">
<span class="text-yellow-400">Balloon Limit</span>
<span class="whitespace-nowrap text-gray-300">

View file

@ -2043,7 +2043,8 @@ const Settings: Component<SettingsProps> = (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) {