@lvce-editor/explorer-view 4.8.0 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1733,11 +1733,12 @@ const getSiblingFileNames = (items, focusedIndex, root, pathSeparator) => {
1733
1733
  return items.filter(item => item.depth === 0).map(item => item.name);
1734
1734
  }
1735
1735
  const focusedItem = items[focusedIndex];
1736
- const focusedItemParentPath = focusedItem.path.slice(0, -(focusedItem.name.length + 1));
1736
+ const nameLength = focusedItem.name ? focusedItem.name.length + 1 : 0;
1737
+ const focusedItemParentPath = focusedItem.path.slice(0, -nameLength);
1737
1738
 
1738
1739
  // Find all items that are direct children of the same parent as the focused item
1739
1740
  const siblingItems = items.filter(item => {
1740
- const itemParentPath = item.path.slice(0, -(item.name.length + 1));
1741
+ const itemParentPath = item.path.slice(0, -nameLength);
1741
1742
  return itemParentPath === focusedItemParentPath;
1742
1743
  });
1743
1744
  return siblingItems.map(item => item.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/explorer-view",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",