chore(style): use eqeqeq (#1013)

This commit is contained in:
q1anx1
2022-08-13 11:23:16 +08:00
committed by GitHub
parent 108fdc174f
commit ca13247572
5 changed files with 8 additions and 9 deletions

View File

@ -75,7 +75,7 @@ function registerValidSW(swUrl, config) {
.then(registration => {
registration.onupdatefound = () => {
const installingWorker = registration.installing;
if (installingWorker == null) {
if (installingWorker === null) {
return;
}
installingWorker.onstatechange = () => {
@ -126,7 +126,7 @@ function checkValidServiceWorker(swUrl, config) {
const contentType = response.headers.get("content-type");
if (
response.status === 404 ||
(contentType != null && contentType.indexOf("javascript") === -1)
(contentType !== null && contentType.indexOf("javascript") === -1)
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {