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 7337df9 commit 7cc27efCopy full SHA for 7cc27ef
src/cart.ts
@@ -4,7 +4,7 @@ import { create } from "zustand";
4
import { StateStorage, createJSONStorage, persist } from "zustand/middleware";
5
6
// check if we are in the browser and set storage type accordingly
7
-const isBrowser = typeof window.document !== "undefined" ? true : false
+const isBrowser = typeof window.document !== 'undefined';
8
const storageType = isBrowser ? localStorage : AsyncStorage;
9
10
interface CartItems {
0 commit comments