We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4afbe7f commit 446a79fCopy full SHA for 446a79f
src/runtime/composables/useGlobalClientDatabaseManager.ts
@@ -1,10 +1,10 @@
1
import { ClientDatabaseManager } from "../utils/clientDatabaseManager.js"
2
3
-if (import.meta.server) {
4
- throw new Error("useGlobalClientDatabaseManager should only be used in the server.")
5
-}
6
let globalState
7
export function useGlobalClientDatabaseManager(): ClientDatabaseManager {
+ if (import.meta.server) {
+ throw new Error("useGlobalClientDatabaseManager should only be used on the client.")
+ }
8
globalState ??= new ClientDatabaseManager()
9
return globalState
10
}
0 commit comments