@contentful/experiences-visual-editor-react 1.13.0-dev-20240904T1932-dfa83dd.0 → 1.13.0

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/renderApp.js CHANGED
@@ -43560,7 +43560,7 @@ const getValueForBreakpoint = (valuesByBreakpoint, breakpoints, activeBreakpoint
43560
43560
  if (valuesByBreakpoint instanceof Object) {
43561
43561
  // Assume that the values are sorted by media query to apply the cascading CSS logic
43562
43562
  for (let index = activeBreakpointIndex; index >= 0; index--) {
43563
- const breakpointId = breakpoints[index].id;
43563
+ const breakpointId = breakpoints[index]?.id;
43564
43564
  if (valuesByBreakpoint[breakpointId]) {
43565
43565
  // If the value is defined, we use it and stop the breakpoints cascade
43566
43566
  return eventuallyResolveDesignTokens(valuesByBreakpoint[breakpointId]);
@@ -43568,8 +43568,10 @@ const getValueForBreakpoint = (valuesByBreakpoint, breakpoints, activeBreakpoint
43568
43568
  }
43569
43569
  // If no breakpoint matched, we search and apply the fallback breakpoint
43570
43570
  const fallbackBreakpointIndex = getFallbackBreakpointIndex(breakpoints);
43571
- const fallbackBreakpointId = breakpoints[fallbackBreakpointIndex].id;
43572
- return eventuallyResolveDesignTokens(valuesByBreakpoint[fallbackBreakpointId]);
43571
+ const fallbackBreakpointId = breakpoints[fallbackBreakpointIndex]?.id;
43572
+ if (valuesByBreakpoint[fallbackBreakpointId]) {
43573
+ return eventuallyResolveDesignTokens(valuesByBreakpoint[fallbackBreakpointId]);
43574
+ }
43573
43575
  }
43574
43576
  else {
43575
43577
  // Old design properties did not support breakpoints, keep for backward compatibility