@usecross/docs 0.12.1 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -630,6 +630,10 @@ function ThemeProvider({
630
630
  function useTheme() {
631
631
  const context = useContext(ThemeContext);
632
632
  if (!context) {
633
+ if (typeof window === "undefined") {
634
+ return { theme: "system", resolvedTheme: "light", setTheme: () => {
635
+ } };
636
+ }
633
637
  throw new Error("useTheme must be used within a ThemeProvider");
634
638
  }
635
639
  return context;