Merge pull request #207 from hyperspacedev/GH-206-notification-reset

Return out of notification toggle when browser is unsupported
This commit is contained in:
Marquis Kurt 2020-05-28 10:49:28 -04:00 committed by GitHub
commit 9c345e741c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -218,6 +218,9 @@ class SettingsPage extends Component<any, ISettingsState> {
* is in `"default"` state, get the permission request first.
*/
togglePushNotifications() {
if (!browserSupportsNotificationRequests()) {
return;
}
if (Notification.permission === "default") {
getNotificationRequestPermission()
.then(permission => {