win can sometimes be null (not sure how?)
This commit is contained in:
parent
d1c09ad71c
commit
eeec63a27e
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ reducers[types.DOWNLOADING_COMPLETED] = function(state, action) {
|
|||
const badgeNumber = state.badgeNumber;
|
||||
|
||||
// Don't update the badge number if the window is focused
|
||||
if (win.isFocused()) return Object.assign({}, state);
|
||||
if (win && win.isFocused()) return Object.assign({}, state);
|
||||
|
||||
return Object.assign({}, state, {
|
||||
badgeNumber: badgeNumber + 1,
|
||||
|
|
Loading…
Add table
Reference in a new issue