Fix unable to clear muted list

## Issue
When the muted list was being cleared from another app, the web version ended up restoring the previous muted list.

## Change
- As long as `blocked` is defined, return that since an empty array is a valid result.
- If undefined, something went wrong when calling the reducer, so retain the muted list. I believe this was the original intention of that line.
This commit is contained in:
infinite-persistence 2021-11-15 13:30:54 +08:00
parent 93c28b24bb
commit f084288ac9
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -36,7 +36,7 @@ export default handleActions(
return {
...state,
blockedChannels: sanitizedBlocked && sanitizedBlocked.length ? sanitizedBlocked : state.blockedChannels,
blockedChannels: sanitizedBlocked || state.blockedChannels,
};
},
},