mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
🚨
This commit is contained in:
parent
d76180796c
commit
26e77a3529
5 changed files with 9 additions and 10 deletions
|
|
@ -1,8 +1,8 @@
|
|||
// https://github.com/siyuan-note/siyuan/pull/8012
|
||||
export const registerServiceWorker = (scriptURL: string) => {
|
||||
if (!'serviceWorker' in navigator || typeof (navigator.serviceWorker) === 'undefined' ||
|
||||
!'caches' in window || !'fetch' in window) {
|
||||
return
|
||||
if (!"serviceWorker" in navigator || typeof (navigator.serviceWorker) === "undefined" ||
|
||||
!"caches" in window || !"fetch" in window) {
|
||||
return;
|
||||
}
|
||||
// REF https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration
|
||||
window.navigator.serviceWorker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue