mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-10 09:39:36 -04:00
Handle fallback for prefs[type] in notifications defaulting to NOTIFICATION_DESTINATION_TYPES.
This commit is contained in:
@@ -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}))
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user