Skip to content

Commit

Permalink
fix(ui5-sebmentedbutton): fix intermittent js error (#1874)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladitasev committed Jun 29, 2020
1 parent 2356cd0 commit c44d9aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/main/src/SegmentedButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class SegmentedButton extends UI5Element {
}

async _handleResize() {
const buttonsHaveWidth = this.widths.some(button => button.offsetWidth > 2); // 2 are the pixel's added for rounding & IE
const buttonsHaveWidth = this.widths && this.widths.some(button => button.offsetWidth > 2); // 2 are the pixel's added for rounding & IE
if (!buttonsHaveWidth) {
await this.measureButtonsWidth();
}
Expand Down

0 comments on commit c44d9aa

Please sign in to comment.