Handle fallback for prefs[type] in notifications defaulting to NOTIFICATION_DESTINATION_TYPES.

This commit is contained in:
MartinBraquet
2026-04-08 15:31:15 +02:00
parent d62121cc00
commit 0952070076

View File

@@ -107,7 +107,7 @@ function LoadedNotificationSettings(props: {privateUser: PrivateUser}) {
key={type}
type={type}
question={question}
selected={prefs[type]}
selected={prefs[type] ?? NOTIFICATION_DESTINATION_TYPES}
onUpdate={(selected) => {
setPrefs((prevPrefs) => ({...prevPrefs, [type]: selected}))
}}