@marigold/system 6.2.0 → 6.2.3

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
@@ -195,6 +195,8 @@ var useResponsiveValue = (values, defaultIndex = 0) => {
195
195
  }
196
196
  const [index, setIndex] = (0, import_react3.useState)(defaultIndex);
197
197
  (0, import_react3.useEffect)(() => {
198
+ if (typeof window == "undefined")
199
+ return;
198
200
  const getIndex = () => Object.values(screens).filter(
199
201
  (breakpoint) => window.matchMedia(`screen and (min-width: ${breakpoint})`).matches
200
202
  ).length;
package/dist/index.mjs CHANGED
@@ -127,6 +127,8 @@ var useResponsiveValue = (values, defaultIndex = 0) => {
127
127
  }
128
128
  const [index, setIndex] = useState(defaultIndex);
129
129
  useEffect(() => {
130
+ if (typeof window == "undefined")
131
+ return;
130
132
  const getIndex = () => Object.values(screens).filter(
131
133
  (breakpoint) => window.matchMedia(`screen and (min-width: ${breakpoint})`).matches
132
134
  ).length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marigold/system",
3
- "version": "6.2.0",
3
+ "version": "6.2.3",
4
4
  "description": "Marigold System Library",
5
5
  "license": "MIT",
6
6
  "keywords": [