diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index abdb7549f..1e4d38b48 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -17,6 +17,7 @@ function onOneDocumentClick() { Notification.requestPermission(); } } + function registerOneDocumentClickHandler() { Events.off(ServerConnections, 'localusersignedin', registerOneDocumentClickHandler); @@ -28,7 +29,7 @@ function initPermissionRequest() { const apiClient = ServerConnections.currentApiClient(); if (apiClient) { apiClient.getCurrentUser() - .then(user => registerOneDocumentClickHandler()) + .then(() => registerOneDocumentClickHandler()) .catch(() => { Events.on(ServerConnections, 'localusersignedin', registerOneDocumentClickHandler); });