Issue with comparison operator in generated service worker (#61066)

This commit is contained in:
Sim Kern Cheh
2020-07-09 00:56:02 +08:00
committed by GitHub
parent a82005a9dc
commit 5f49654734

View File

@@ -526,11 +526,11 @@ self.addEventListener("fetch", (event) => {
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.data == 'skipWaiting') {
if (event.data === 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
if (event.message === 'downloadOffline') {
downloadOffline();
}
});