django-webpush
django-webpush copied to clipboard
"ReferenceError: Notification is not defined" on Firefox when notifications are disabled
If a Firefox user has disabled notifications globally by setting dom.webnotifications.enabled:false in prefs (like me!), there will be no Notification object. webpush.js needs to check whether it exists before trying to test its properties.
See also https://miketaylr.com/posts/2017/02/how-not-to-feature-detect.html which helped me work out the problem after a lot of searching. I had forgotten that I disabled notifications.
Thanks!
Thanks a lot @marauder37 for the issue! I did not know about it! I will try to fix the issue soon!