[Bug] Chrome makes empty null request
Closed this issue · 0 comments
martijnb92 commented
A bug was introduced in 0085ee3
If no icon is specified an empty 'icon' attribute is created. This causes Chrome to make a request to serviceworkerdomain/null, which returns a 404 in my case.
I solved this in my service worker by deleting the empty attribute.
sendNotification (data) {
delete data.actions[0].icon;
return self.registration.showNotification(data.title, data)
},
Attribute shouldn't exist if it is empty.