fix undefined error
Make sure unreadForChannel is defined before checking type.
This commit is contained in:
parent
b72ac5eb7d
commit
3321483395
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ export function doUpdateLoadStatus(uri: string, outpoint: string) {
|
|||
const { claimName: channelName } = parseURI(channelUri);
|
||||
|
||||
const unreadForChannel = makeSelectUnreadByChannel(channelUri)(state);
|
||||
if (unreadForChannel.type === NOTIFICATION_TYPES.DOWNLOADING) {
|
||||
if (unreadForChannel && unreadForChannel.type === NOTIFICATION_TYPES.DOWNLOADING) {
|
||||
const count = unreadForChannel.uris.length;
|
||||
|
||||
if (selectosNotificationsEnabled(state)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue