This commit is contained in:
Kerwin Bryant 2025-03-04 11:21:39 +00:00
parent 3cbcd95e6a
commit 6f2de3ea5e
2 changed files with 8 additions and 4 deletions

View File

@ -84,10 +84,13 @@ export function initViewFileTreeSidebar() {
}}); }});
fileTreeView.mount(fileTree); fileTreeView.mount(fileTree);
if (!window.popstateListenerForViewFilePageAdded) {
window.addEventListener('popstate', () => { window.addEventListener('popstate', () => {
selectedItem.value = getSelectedPath(refString); selectedItem.value = getSelectedPath(refString);
loadContent(el); loadContent(el);
}); });
window.popstateListenerForViewFilePageAdded = true;
}
}); });
} }

View File

@ -74,5 +74,6 @@ interface Window {
turnstile: any, turnstile: any,
hcaptcha: any, hcaptcha: any,
codeEditors: any[], codeEditors: any[],
popstateListenerForViewFilePageAdded: boolean,
updateCloneStates: () => void, updateCloneStates: () => void,
} }