Skip to content

ServiceWorker is not defined error #41

@mofojed

Description

@mofojed

Got a report of a "ServiceWorker is not defined" error. Not sure in which contexts where ServiceWorker can be undefined, but we should check if it's undefined before checking an instanceof to make sure we don't hit this error:

source instanceof ServiceWorker ||

Looks like ServiceWorker is only defined in a SecureContext. If you go to http://example.com/ for example, check the browser console and ServiceWorker is undefined there. We should check this and handle it.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions