diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-05-05 21:39:55 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-05-05 21:39:55 -1000 |
| commit | 29fb98a20923b1b04a126ca00a2c21448ed822d5 (patch) | |
| tree | 02c1083a98378bb9ac4db8d9cedc0e9ed1d9bdb9 /test-runner/src/main | |
| parent | 32e510f90442988884a78ff1ec473ebf66facf76 (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 'test-runner/src/main')
0 files changed, 0 insertions, 0 deletions
