[TabLayout] fix currentKey condition

This commit is contained in:
고동영
2024-07-02 14:06:58 +09:00
parent 11c9ce276a
commit 93bfbbe478

View File

@@ -92,7 +92,7 @@ class TabMenuItem {
}
hasChildren = () => {
return this.children.length > 1;
return this.children.length > 0;
};
getChildren = () => {
@@ -311,7 +311,7 @@ export default function TabLayout({ topPanelName, onTabActivated, panelInfo }) {
menuItems[i].spotlightId = menuInfo[j].spotlightId;
menuItems[i].icons = menuInfo[j].icons;
if (currentKey === 10600 || 10500 || 10300) {
if ([10600, 10500, 10300].includes(currentKey)) {
menuItems[i].children = menuInfo.map((item) => ({
id: item.id,
title: item.title,