@sanity/ui 3.0.0-static.37 → 3.0.0-static.39

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.
@@ -780,7 +780,7 @@ function _getMediaQuery(media2, index) {
780
780
  }
781
781
  function _createMediaStore() {
782
782
  const mediaLen = media.length;
783
- let sizes = [];
783
+ let sizes;
784
784
  const getSizes = () => {
785
785
  if (typeof window > "u")
786
786
  return sizes;
@@ -801,7 +801,7 @@ function _createMediaStore() {
801
801
  for (const {
802
802
  index,
803
803
  mq
804
- } of getSizes())
804
+ } of getSizes() ?? [])
805
805
  if (mq.matches) return index;
806
806
  return 0;
807
807
  },
@@ -809,7 +809,7 @@ function _createMediaStore() {
809
809
  const disposeFns = [];
810
810
  for (const {
811
811
  mq
812
- } of getSizes()) {
812
+ } of getSizes() ?? []) {
813
813
  const handleChange = () => {
814
814
  mq.matches && onStoreChange();
815
815
  };