Skip to content

Commit 7d591c2

Browse files
authored
fix(ui5-tabcontainer): guard against null overflow elements (#13565)
fixes: #13532
1 parent 9e68915 commit 7d591c2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/main/src/TabContainer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,8 +1316,10 @@ class TabContainer extends UI5Element {
13161316
}
13171317

13181318
const focusableRefs = [];
1319+
const startOverflow = this._getStartOverflow();
1320+
const endOverflow = this._getEndOverflow();
13191321

1320-
if (!this._getStartOverflow().hasAttribute("hidden")) {
1322+
if (startOverflow && !startOverflow.hasAttribute("hidden")) {
13211323
focusableRefs.push(this.startOverflowButton[0] || this._getStartOverflowBtnDOM());
13221324
}
13231325

@@ -1330,7 +1332,7 @@ class TabContainer extends UI5Element {
13301332
}
13311333
});
13321334

1333-
if (!this._getEndOverflow().hasAttribute("hidden")) {
1335+
if (endOverflow && !endOverflow.hasAttribute("hidden")) {
13341336
focusableRefs.push(this.overflowButton[0] || this._getEndOverflowBtnDOM());
13351337
}
13361338

0 commit comments

Comments
 (0)