diff --git a/src/apps/cli/main.ts b/src/apps/cli/main.ts index 442d9c9..fac1072 100644 --- a/src/apps/cli/main.ts +++ b/src/apps/cli/main.ts @@ -3,7 +3,7 @@ * Command-line version of Self-hosted LiveSync plugin for syncing vaults without Obsidian */ -if (!("localStorage" in globalThis)) { +if (!("localStorage" in globalThis) || typeof (globalThis as any).localStorage?.getItem !== "function") { const store = new Map(); (globalThis as any).localStorage = { getItem: (key: string) => (store.has(key) ? store.get(key)! : null),