fix: handle missing sound saga payloads (#45645)

This commit is contained in:
Oliver Eyton-Williams
2022-04-08 19:57:57 +02:00
committed by GitHub
parent 4f3b131a4b
commit 1d87c3c4f2

View File

@ -9,7 +9,8 @@ export function setSound(setting) {
store.set(soundKey, setting);
}
function* updateLocalSoundSaga({ payload: { user, sound } }) {
function* updateLocalSoundSaga({ payload }) {
const { user, sound } = payload ?? {};
if (user) {
const { sound = false } = user;
setSound(sound);