@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.
@@ -771,7 +771,7 @@ function _getMediaQuery(media2, index) {
771
771
  }
772
772
  function _createMediaStore() {
773
773
  const mediaLen = media.length;
774
- let sizes = [];
774
+ let sizes;
775
775
  const getSizes = () => {
776
776
  if (typeof window > "u")
777
777
  return sizes;
@@ -792,7 +792,7 @@ function _createMediaStore() {
792
792
  for (const {
793
793
  index,
794
794
  mq
795
- } of getSizes())
795
+ } of getSizes() ?? [])
796
796
  if (mq.matches) return index;
797
797
  return 0;
798
798
  },
@@ -800,7 +800,7 @@ function _createMediaStore() {
800
800
  const disposeFns = [];
801
801
  for (const {
802
802
  mq
803
- } of getSizes()) {
803
+ } of getSizes() ?? []) {
804
804
  const handleChange = () => {
805
805
  mq.matches && onStoreChange();
806
806
  };