fix: popup currentPath is not defined après suppression/renommage de répertoire #BUG-114
CI / lint (push) Successful in 3m9s
CI / security (push) Successful in 1m59s
CI / test (push) Successful in 5m12s
CI / build (push) Successful in 1m49s
CI / e2e (push) Successful in 17m57s

This commit is contained in:
2026-10-14 21:20:08 -04:00
parent 2ebfe74459
commit cbe3d9bc75
11 changed files with 32 additions and 16 deletions
+3 -3
View File
@@ -964,8 +964,8 @@ const FileOperations = {
if (type === 'file' && state.currentVault === vault && state.currentPath === path) {
await openFile(vault, nextPath);
} else if (type === 'directory' && state.currentVault === vault && state.currentPath && (state.currentPath === path || currentPath.startsWith(`${path}/`))) {
const suffix = state.currentPath === path ? '' : currentPath.slice(path.length);
} else if (type === 'directory' && state.currentVault === vault && state.currentPath && (state.currentPath === path || state.currentPath.startsWith(`${path}/`))) {
const suffix = state.currentPath === path ? '' : state.currentPath.slice(path.length);
state.currentPath = `${nextPath}${suffix}`;
await focusPathInSidebar(vault, state.currentPath, { alignToTop: false });
}
@@ -1051,7 +1051,7 @@ const FileOperations = {
this._closeModal(overlay);
await refreshSidebarTreePreservingState();
if (state.currentVault === vault && state.currentPath && currentPath.startsWith(path)) {
if (state.currentVault === vault && state.currentPath && state.currentPath.startsWith(path)) {
showWelcome();
}
} catch (err) {