Skip to content

Commit

Permalink
fix typeof
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnaveen committed Oct 27, 2023
1 parent 7337df9 commit 7cc27ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7cc27ef

Please sign in to comment.