From 7cc27ef57791a29fbafd019eeb176daed381b17b Mon Sep 17 00:00:00 2001 From: mcnaveen <8493007+mcnaveen@users.noreply.github.com> Date: Fri, 27 Oct 2023 12:00:16 +0530 Subject: [PATCH] fix typeof --- src/cart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cart.ts b/src/cart.ts index 7f5679e..c00cc66 100644 --- a/src/cart.ts +++ b/src/cart.ts @@ -4,7 +4,7 @@ import { create } from "zustand"; import { StateStorage, createJSONStorage, persist } from "zustand/middleware"; // check if we are in the browser and set storage type accordingly -const isBrowser = typeof window.document !== "undefined" ? true : false +const isBrowser = typeof window.document !== 'undefined'; const storageType = isBrowser ? localStorage : AsyncStorage; interface CartItems {