@sensiblestats/widget-react 0.70.0 → 0.70.1

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
@@ -9020,7 +9020,7 @@ function usePresetGrid({ getPricePresets, isOpen, locale, now = Date.now }) {
9020
9020
  if (age <= GRID_MAX_AGE_MS) return;
9021
9021
  inFlightRef.current = true;
9022
9022
  Promise.resolve().then(() => getRef.current(locale)).then((body) => {
9023
- if (body === null) {
9023
+ if (body === null || isPresetGrid(body) && !hasAnyCell(body)) {
9024
9024
  keptRef.current = null;
9025
9025
  if (mountedRef.current) setGrid(null);
9026
9026
  return;
@@ -9035,6 +9035,9 @@ function usePresetGrid({ getPricePresets, isOpen, locale, now = Date.now }) {
9035
9035
  }, [isOpen, locale]);
9036
9036
  return grid;
9037
9037
  }
9038
+ function hasAnyCell(grid) {
9039
+ return grid.singles.length > 0 || grid.singlesFrom.length > 0 || grid.combos.length > 0;
9040
+ }
9038
9041
 
9039
9042
  // src/popupTelemetry.ts
9040
9043
  import { useCallback as useCallback13, useEffect as useEffect24, useRef as useRef20 } from "react";