Skip to content

Commit

Permalink
Update registerServiceWorker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Angryman18 committed Aug 4, 2022
1 parent 43c47f6 commit 9b5da88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/registerServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Workbox } from "workbox-window";

const register = () => {
if (process.env.NODE_ENV !== "production") return;
if (navigator.serviceWorker) {
if (navigator?.serviceWorker) {
const wb = new Workbox(`${process.env.PUBLIC_URL}/service-worker.js`);

const checkForUpdate = () => {
Expand Down

0 comments on commit 9b5da88

Please sign in to comment.