Skip to content

Commit 446a79f

Browse files
committed
v0fix: fixed error message for client side composable
1 parent 4afbe7f commit 446a79f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { ClientDatabaseManager } from "../utils/clientDatabaseManager.js"
22

3-
if (import.meta.server) {
4-
throw new Error("useGlobalClientDatabaseManager should only be used in the server.")
5-
}
63
let globalState
74
export function useGlobalClientDatabaseManager(): ClientDatabaseManager {
5+
if (import.meta.server) {
6+
throw new Error("useGlobalClientDatabaseManager should only be used on the client.")
7+
}
88
globalState ??= new ClientDatabaseManager()
99
return globalState
1010
}

0 commit comments

Comments
 (0)