Skip to content

Commit c44d9aa

Browse files
authored
fix(ui5-sebmentedbutton): fix intermittent js error (#1874)
1 parent 2356cd0 commit c44d9aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/main/src/SegmentedButton.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class SegmentedButton extends UI5Element {
212212
}
213213

214214
async _handleResize() {
215-
const buttonsHaveWidth = this.widths.some(button => button.offsetWidth > 2); // 2 are the pixel's added for rounding & IE
215+
const buttonsHaveWidth = this.widths && this.widths.some(button => button.offsetWidth > 2); // 2 are the pixel's added for rounding & IE
216216
if (!buttonsHaveWidth) {
217217
await this.measureButtonsWidth();
218218
}

0 commit comments

Comments
 (0)