File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ function reloadContentScript(sidebarEl: HTMLElement, contentEl: Element) {
5757}
5858
5959export function initViewFileTreeSidebar ( ) {
60+ let popstateListenerForViewFilePageAdded = false ;
6061 registerGlobalInitFunc ( 'initViewFileTreeSidebar' , async ( el : HTMLElement ) => {
6162 el . querySelector ( '.hide-tree-sidebar-button' ) . addEventListener ( 'click' , ( ) => {
6263 toggleSidebar ( el , false ) ;
@@ -84,12 +85,12 @@ export function initViewFileTreeSidebar() {
8485 } } ) ;
8586 fileTreeView . mount ( fileTree ) ;
8687
87- if ( ! window . popstateListenerForViewFilePageAdded ) {
88+ if ( ! popstateListenerForViewFilePageAdded ) {
8889 window . addEventListener ( 'popstate' , ( ) => {
8990 selectedItem . value = getSelectedPath ( refString ) ;
9091 loadContent ( el ) ;
9192 } ) ;
92- window . popstateListenerForViewFilePageAdded = true ;
93+ popstateListenerForViewFilePageAdded = true ;
9394 }
9495 } ) ;
9596}
You can’t perform that action at this time.
0 commit comments