@julseb-lib/react 0.1.20 → 0.1.22

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.cjs CHANGED
@@ -2616,7 +2616,9 @@ var useTranslation = (translations) => {
2616
2616
  const [language, setLanguage] = (0, import_react13.useState)(currentLanguage);
2617
2617
  const languages = Object.keys(translations);
2618
2618
  (0, import_react13.useEffect)(() => {
2619
- currentLanguage = language || "en";
2619
+ if (window && typeof window !== "undefined") {
2620
+ currentLanguage = language || "en";
2621
+ }
2620
2622
  }, [language]);
2621
2623
  const translate = (key) => {
2622
2624
  var _a;