fix: popup currentPath is not defined après suppression/renommage de répertoire #BUG-114
This commit is contained in:
+3
-3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user