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);
window.addEventListener('popstate', () => {
selectedItem.value = getSelectedPath(refString);
loadContent(el);
});
if (!window.popstateListenerForViewFilePageAdded) {
window.addEventListener('popstate', () => {
selectedItem.value = getSelectedPath(refString);
loadContent(el);
});
window.popstateListenerForViewFilePageAdded = true;
}
});
}

View File

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