@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.js CHANGED
@@ -2437,7 +2437,9 @@ var useTranslation = (translations) => {
2437
2437
  const [language, setLanguage] = useState9(currentLanguage);
2438
2438
  const languages = Object.keys(translations);
2439
2439
  useEffect7(() => {
2440
- currentLanguage = language || "en";
2440
+ if (window && typeof window !== "undefined") {
2441
+ currentLanguage = language || "en";
2442
+ }
2441
2443
  }, [language]);
2442
2444
  const translate = (key) => {
2443
2445
  var _a;