summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-05-05 21:39:55 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-05-05 21:39:55 -1000
commit29fb98a20923b1b04a126ca00a2c21448ed822d5 (patch)
tree02c1083a98378bb9ac4db8d9cedc0e9ed1d9bdb9 /scripts
parent32e510f90442988884a78ff1ec473ebf66facf76 (diff)
fix: remove crash-risk !! operators in UnitPrefs and MainViewModel
UnitPrefs: getString() returns String? even with a non-null default, so !! crashes on corrupted prefs. Replaced with explicit elvis fallback to the same enum default. MainViewModel: forecastResult.getOrThrow() is logically safe (when-branch guards it) but unnecessarily brittle. Replaced with getOrNull() ?: emptyList(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions