Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:rotating_light:

Vanessa7e0716eafc02
diff --git a/app/src/util/serviceWorker.ts b/app/src/util/serviceWorker.ts
index 2388b25ead..a7409745e1 100644
--- a/app/src/util/serviceWorker.ts
+++ b/app/src/util/serviceWorker.ts
@@ -1,7 +1,7 @@
// 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) {
+ 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