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.
|
* is in `"default"` state, get the permission request first.
|
||||||
*/
|
*/
|
||||||
togglePushNotifications() {
|
togglePushNotifications() {
|
||||||
|
if (!browserSupportsNotificationRequests()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (Notification.permission === "default") {
|
if (Notification.permission === "default") {
|
||||||
getNotificationRequestPermission()
|
getNotificationRequestPermission()
|
||||||
.then(permission => {
|
.then(permission => {
|
||||||
|
|
Loading…
Reference in New Issue