Skip to content

Commit e9a48c5

Browse files
committed
refactor(ui5-list): simplify _shouldFocusGrowingButton logic
1 parent 2e72928 commit e9a48c5

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

packages/main/src/List.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,10 +1419,7 @@ class List extends UI5Element {
14191419
const lastIndex = items.length - 1;
14201420
const currentIndex = this._itemNavigation._currentIndex;
14211421

1422-
if (currentIndex !== -1 && currentIndex === lastIndex) {
1423-
return true;
1424-
}
1425-
return false;
1422+
return currentIndex !== -1 && currentIndex === lastIndex;
14261423
}
14271424

14281425
getGrowingButton() {

0 commit comments

Comments
 (0)