Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.

Commit e71e1f4

Browse files
author
Adam
committed
stop saying "x is up next" when there is no next user
1 parent 798f002 commit e71e1f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/state/epics/timerEpics.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ export const alertEpic = (
5454
.ofType(COUNT_DOWN_FINISHED)
5555
.flatMap((): any => {
5656
const state = store.getState().users
57+
const nextUser = state.list[state.activeUser]
5758

5859
return [
5960
notify("Time's up!", {
60-
body: `${state.list[state.activeUser]} is up next!`,
61+
body: nextUser && `${nextUser} is up next!`,
6162
badge: timer,
6263
icon: timer,
6364
vibrate: [2000, 2000, 2000],

0 commit comments

Comments
 (0)