mirror of
https://github.com/hyperspacedev/hyperspace
synced 2025-02-06 04:13:22 +01:00
Merge pull request #207 from hyperspacedev/GH-206-notification-reset
Return out of notification toggle when browser is unsupported
This commit is contained in:
commit
9c345e741c
@ -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 => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user