mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-16 21:10:02 -04:00
Whoops
This commit is contained in:
parent
11dce272a4
commit
a3094b3923
1 changed files with 6 additions and 6 deletions
12
public/sw.js
12
public/sw.js
|
@ -16,6 +16,7 @@ localforage.config({
|
||||||
description: "Nebula Config for things reliant on IndexedDB"
|
description: "Nebula Config for things reliant on IndexedDB"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const uv = new UVServiceWorker();
|
||||||
const dynPromise = new Promise(async (resolve) => {
|
const dynPromise = new Promise(async (resolve) => {
|
||||||
try {
|
try {
|
||||||
const bare =
|
const bare =
|
||||||
|
@ -44,18 +45,17 @@ self.addEventListener("fetch", (event) => {
|
||||||
})()
|
})()
|
||||||
);
|
);
|
||||||
} else if (
|
} else if (
|
||||||
event.request.url.startsWith(location.origin + self.__uv$config.prefix)
|
event.request.url.startsWith(location.origin + __uv$config.prefix)
|
||||||
) {
|
) {
|
||||||
event.respondWith(
|
event.respondWith(
|
||||||
(async function () {
|
(async function () {
|
||||||
return await self.uv.fetch(event);
|
return await uv.fetch(event);
|
||||||
})()
|
})()
|
||||||
);
|
)}
|
||||||
} else {
|
else {
|
||||||
event.respondWith(
|
event.respondWith(
|
||||||
(async function () {
|
(async function () {
|
||||||
return await fetch(event.request);
|
return await fetch(event.request);
|
||||||
})()
|
})()
|
||||||
);
|
)}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue