mol_dump_lib 0.0.649 → 0.0.650

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/web.mjs CHANGED
@@ -3892,7 +3892,7 @@ var $;
3892
3892
  min = 0;
3893
3893
  top = Math.ceil(rect?.top ?? 0);
3894
3894
  while (min < (kids.length - 1)) {
3895
- const height = kids[min].minimal_height();
3895
+ const height = kids[min]?.minimal_height() ?? 0;
3896
3896
  if (top + height >= limit_top)
3897
3897
  break;
3898
3898
  top += height;
@@ -3914,21 +3914,21 @@ var $;
3914
3914
  }
3915
3915
  while (anchoring && ((top2 > limit_top) && (min2 > 0))) {
3916
3916
  --min2;
3917
- top2 -= kids[min2].minimal_height();
3917
+ top2 -= kids[min2]?.minimal_height() ?? 0;
3918
3918
  }
3919
3919
  while (bottom2 < limit_bottom && max2 < kids.length) {
3920
- bottom2 += kids[max2].minimal_height();
3920
+ bottom2 += kids[max2]?.minimal_height() ?? 0;
3921
3921
  ++max2;
3922
3922
  }
3923
3923
  return [min2, max2];
3924
3924
  }
3925
3925
  gap_before() {
3926
3926
  const skipped = this.sub().slice(0, this.view_window()[0]);
3927
- return Math.max(0, skipped.reduce((sum, view) => sum + view.minimal_height(), 0));
3927
+ return Math.max(0, skipped.reduce((sum, view) => sum + (view?.minimal_height() ?? 0), 0));
3928
3928
  }
3929
3929
  gap_after() {
3930
3930
  const skipped = this.sub().slice(this.view_window()[1]);
3931
- return Math.max(0, skipped.reduce((sum, view) => sum + view.minimal_height(), 0));
3931
+ return Math.max(0, skipped.reduce((sum, view) => sum + (view?.minimal_height() ?? 0), 0));
3932
3932
  }
3933
3933
  sub_visible() {
3934
3934
  return [
@@ -3940,7 +3940,7 @@ var $;
3940
3940
  minimal_height() {
3941
3941
  return this.sub().reduce((sum, view) => {
3942
3942
  try {
3943
- return sum + view.minimal_height();
3943
+ return sum + (view?.minimal_height() ?? 0);
3944
3944
  }
3945
3945
  catch (error) {
3946
3946
  $mol_fail_log(error);