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

[Bug] Chrome makes empty null request #130

Closed
martijnb92 opened this issue Jul 16, 2020 · 0 comments
Closed

[Bug] Chrome makes empty null request #130

martijnb92 opened this issue Jul 16, 2020 · 0 comments

Comments

@martijnb92
Copy link
Contributor

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.

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

1 participant