Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ReferenceError: Notification is not defined" on Firefox when notifications are disabled #55

Open
marauder37 opened this issue Jan 30, 2019 · 1 comment

Comments

@marauder37
Copy link

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!

@safwanrahman
Copy link
Owner

Thanks a lot @marauder37 for the issue! I did not know about it!
I will try to fix the issue soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants