mirror of
https://github.com/chinchang/web-maker.git
synced 2025-02-24 15:12:51 +01:00
prevent sw in debug env
This commit is contained in:
parent
21776e2f7e
commit
317ed8fa08
@ -16,7 +16,8 @@
|
||||
|
||||
/* eslint-env browser */
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
if ('serviceWorker' in navigator && document.cookie.indexOf('wmdebug') === -1) {
|
||||
|
||||
// Delay registration until after the page has loaded, to ensure that our
|
||||
// precaching requests don't degrade the first visit experience.
|
||||
// See https://developers.google.com/web/fundamentals/instant-and-offline/service-worker/registration
|
||||
|
Loading…
x
Reference in New Issue
Block a user