fix
This commit is contained in:
parent
5e9dd4e4c9
commit
d51bdad679
|
|
@ -103,10 +103,20 @@ export const serveStatic = {
|
||||||
if (g.mode === "dev") {
|
if (g.mode === "dev") {
|
||||||
await this.walk();
|
await this.walk();
|
||||||
} else {
|
} else {
|
||||||
return new Response("", {
|
return new Response(
|
||||||
status: 404,
|
`
|
||||||
headers: { "content-type": "text/javascript" },
|
navigator.serviceWorker.getRegistration().then(function(reg) {
|
||||||
});
|
if (reg) {
|
||||||
|
reg.unregister().then(function() { window.location.reload(true); });
|
||||||
|
} else {
|
||||||
|
window.location.reload(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
`,
|
||||||
|
{
|
||||||
|
headers: { "content-type": "text/javascript" },
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue