ui: fix build errors

This commit is contained in:
undefined committed 2022-09-30 23:28:40 +08:00
1 parent 1608b4b9aa
commit 7f96f602ce
11 files changed
+22 -16

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ const target = [
'https://us.hydro.ac',
];
this.addEventListener('install', () => {
(this as any).addEventListener('install', () => {
console.log('Service Worker installing');
});
async function get(url) {
@@ -23,7 +23,7 @@ async function get(url) {
}
return response;
}
this.addEventListener('fetch', (event) => {
(this as any).addEventListener('fetch', (event) => {
// eslint-disable-next-line no-restricted-globals
if (new URL(event.request.url).origin !== location.origin) return;
event.respondWith(get(event.request.url));