diff options
Diffstat (limited to 'modern/src/SocketController.js')
-rw-r--r-- | modern/src/SocketController.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js index 901f5060..ae82d134 100644 --- a/modern/src/SocketController.js +++ b/modern/src/SocketController.js @@ -7,10 +7,10 @@ import { useEffectAsync } from './reactHelper'; const displayNotifications = (events) => { if ('Notification' in window) { if (Notification.permission === 'granted') { - for (const event of events) { + events.forEach((event) => { const notification = new Notification(`Event: ${event.type}`); setTimeout(notification.close.bind(notification), 4 * 1000); - } + }); } else if (Notification.permission !== 'denied') { Notification.requestPermission((permission) => { if (permission === 'granted') { |