mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix build errors
This commit is contained in:
1 parent
1608b4b9aa
commit
7f96f602ce
11 files changed
+22
-16
No files matched your search
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user