fix: capture vault/path avant closeEditor() pour rafraichir l'affichage après save
All checks were successful
CI / lint (push) Successful in 12s
CI / security (push) Successful in 8s
CI / test (push) Successful in 15s
CI / build (push) Successful in 2s

This commit is contained in:
Bruno Charest 2026-05-29 21:20:24 -04:00
parent c20a61f8ba
commit 1243782b6a

View File

@ -424,10 +424,12 @@ async function saveFile() {
saveBtn.innerHTML = '<i data-lucide="check" style="width:16px;height:16px"></i>';
safeCreateIcons();
const _savedVault = state.editorVault;
const _savedPath = state.editorPath;
setTimeout(() => {
closeEditor();
if (state.currentVault === state.editorVault && state.currentPath === state.editorPath) {
openFile(state.currentVault, state.currentPath);
if (state.currentVault === _savedVault && state.currentPath === _savedPath) {
openFile(_savedVault, _savedPath);
}
}, 800);
} catch (err) {