Merge pull request #8345 from 01zulfi/web/fix-toolbar-bug

web: fix toolbar crash
This commit is contained in:
Abdullah Atta
2025-07-14 10:49:54 +05:00
committed by GitHub

View File

@@ -680,7 +680,8 @@ type ResolvedGroup = {
};
function getGroup(items: TreeNode[], groupId: string): ResolvedGroup | null {
const index = items.findIndex((item) => item.id === groupId);
const group = items[index];
const group = items.at(index);
if (!group) return null;
if (!isGroup(group) && !isSubgroup(group)) return null;
const nextGroupIndex = items.findIndex(