displayBookmarks(await sort_a_to_z(tree), bookmarkList);
The displayBookmarks function expects nodes (children array), but sort functions return roots (the full tree). The code passes tree (which is [{children: [...]}]) but then accesses .children internally
- this works by accident at line 6 but is semantically wrong when returned from sort.