@annalib/anna-core 22.1.32 → 22.1.33

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.
@@ -3949,10 +3949,10 @@ class AnnaNonEditableGenericTableComponent {
3949
3949
  elementArr.forEach((item) => {
3950
3950
  let childDivElements = item.nativeElement.children;
3951
3951
  if (childDivElements.length == 2) {
3952
- let firstParagraphWidth = childDivElements[0].children[0];
3953
- let secondParagraphWidth = childDivElements[1].children[0];
3954
- if (firstParagraphWidth?.offsetWidth > secondParagraphWidth.offsetWidth) {
3955
- let diff = firstParagraphWidth?.offsetWidth - secondParagraphWidth.offsetWidth;
3952
+ let firstParagraphOffsetWidth = childDivElements[0]?.children[0]?.offsetWidth ? childDivElements[0]?.children[0]?.offsetWidth : 0;
3953
+ let secondParagraphOffsetWidth = childDivElements[1].children[0]?.offsetWidth ? childDivElements[1].children[0]?.offsetWidth : 0;
3954
+ if (firstParagraphOffsetWidth > secondParagraphOffsetWidth) {
3955
+ let diff = firstParagraphOffsetWidth - secondParagraphOffsetWidth;
3956
3956
  if (childDivElements[0].children.length == 2) {
3957
3957
  childDivElements[0].children[1].style.marginLeft = 4 + 'px';
3958
3958
  }
@@ -3961,7 +3961,7 @@ class AnnaNonEditableGenericTableComponent {
3961
3961
  }
3962
3962
  }
3963
3963
  else {
3964
- let diff = secondParagraphWidth?.offsetWidth - firstParagraphWidth?.offsetWidth;
3964
+ let diff = secondParagraphOffsetWidth - firstParagraphOffsetWidth;
3965
3965
  if (childDivElements[0].children.length == 2) {
3966
3966
  childDivElements[0].children[1].style.marginLeft = diff + 4 + 'px';
3967
3967
  }