DEV: Do not install service workers in development (#12708)

This commit is contained in:
Rafael dos Santos Silva 2021-04-14 18:21:28 -03:00 committed by GitHub
parent 32689573fa
commit b5fba751a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -4,9 +4,7 @@ export default {
name: "register-service-worker", name: "register-service-worker",
initialize(container) { initialize(container) {
const isSecured = const isSecured = document.location.protocol === "https:";
document.location.protocol === "https:" ||
location.hostname === "localhost";
if (isSecured && "serviceWorker" in navigator) { if (isSecured && "serviceWorker" in navigator) {
let { serviceWorkerURL } = container.lookup("session:main"); let { serviceWorkerURL } = container.lookup("session:main");