From 0baa4cfe2f1ab6e9aadb3d7714a7b74642be471e Mon Sep 17 00:00:00 2001 From: Simka <0xsimka@gmail.com> Date: Wed, 2 Apr 2025 13:20:37 +0300 Subject: [PATCH] fix: Removed unnecessary check in useTheme --- apps/base-docs/contexts/Theme.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/base-docs/contexts/Theme.tsx b/apps/base-docs/contexts/Theme.tsx index 7ef33ff8af..0fce539353 100644 --- a/apps/base-docs/contexts/Theme.tsx +++ b/apps/base-docs/contexts/Theme.tsx @@ -21,7 +21,7 @@ export const ThemeContext = createContext({ export function useTheme() { const context = useContext(ThemeContext); - if (context === undefined) { + if (!context) { throw new Error('useTheme must be used within a ThemeProvider'); } return context;