This commit is contained in:
Vanessa 2023-04-25 10:57:14 +08:00
parent 4946121b01
commit 2494412f77
6 changed files with 10 additions and 10 deletions

View file

@ -1,5 +1,5 @@
// https://github.com/siyuan-note/siyuan/pull/8012
export const registerServiceWorker = (scriptURL: string, scope: string = "/", workerType: WorkerType = "module") => {
export const registerServiceWorker = (scriptURL: string, scope = "/", workerType: WorkerType = "module") => {
if (!("serviceWorker" in navigator) || typeof (navigator.serviceWorker) === "undefined" ||
!("caches" in window) || !("fetch" in window)) {
return;