mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-06-11 01:14:45 +02:00
fix: nullsafe broadcast_pager_alerts in quake panel — prevent geohazards blank page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5624a0bfdb
commit
a9d4ede68e
3 changed files with 4 additions and 4 deletions
|
|
@ -766,9 +766,9 @@ const save = async () => {
|
|||
{(['green','yellow','orange','red'] as const).map((level) => (
|
||||
<label key={level} className="flex items-center gap-2 cursor-pointer">
|
||||
<input type="checkbox"
|
||||
checked={env.usgs_quake.broadcast_pager_alerts.includes(level)}
|
||||
checked={(env.usgs_quake.broadcast_pager_alerts ?? []).includes(level)}
|
||||
onChange={(e) => {
|
||||
const cur = env.usgs_quake.broadcast_pager_alerts
|
||||
const cur = env.usgs_quake.broadcast_pager_alerts ?? []
|
||||
up({ usgs_quake: { ...env.usgs_quake,
|
||||
broadcast_pager_alerts: e.target.checked
|
||||
? [...cur, level]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue