🐛 Fix `Notification not defined` in Duckduckgo browser (Fix #224 again)

This commit is contained in:
Luc Didry 2021-06-16 11:45:29 +02:00
parent 0374786f4f
commit 295e660461
No known key found for this signature in database
GPG Key ID: EA868E12D0257E3C
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ Revision history for Lufi
?.??.? ????-??-??
- 🔧 Set default morbo port to 3000 (as it should have stay)
- 🐛 Fix `Notification not defined` in Duckduckgo browser (Fix #224 again)
0.05.13 2021-01-28
- 🐛 Fix latest git tag improperly fetched

View File

@ -1,5 +1,5 @@
function notify(title, body) {
if (!'Notification' in window) {
if (!'Notification' in window || typeof(Notification) === 'undefined') {
console.log("This browser does not support desktop notification, cannot send following message: "+title+" "+body);
return;
}
@ -16,7 +16,7 @@ function notify(title, body) {
}
document.addEventListener('DOMContentLoaded', function () {
if (!'Notification' in window) {
if (!'Notification' in window || typeof(Notification) === 'undefined') {
return;
}