fix return error

This commit is contained in:
Pooya Parsa 2020-11-04 01:31:34 +01:00
parent fab1326cd8
commit fac79cb091

View File

@ -6,10 +6,6 @@
<meta charset="utf-8">
<link rel="prefetch" href="/nuxt.sw.js">
<script>
if (location.host !== 'localhost' && location.protocol === 'http:') {
return location.replace(location.href.replace('http://', 'https://'))
}
async function reload() {
const html = await fetch(window.location.href).then(r => r.text())
if (html.includes('<!-- SW_INIT-->')) {
@ -31,7 +27,11 @@
})
}
register()
if (location.host !== 'localhost' && location.protocol === 'http:') {
location.replace(location.href.replace('http://', 'https://'))
} else {
register()
}
</script>
</head>