File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -206,13 +206,15 @@ async function renderSidebarHTML() {
206206 // get repo obj from local storage
207207 const repoObj = modifiedRepos [ user + '/' + repoName ] ;
208208
209+ // if repo obj exists
209210 if ( repoObj ) {
210211
211212 // delete repo obj from modified repos
212213 deleteModRepo ( user + '/' + repoName ) ;
213214
214215 }
215216
217+
216218 // change location
217219 treeLoc [ 1 ] = '' ;
218220 treeLoc [ 2 ] = '' ;
@@ -606,8 +608,11 @@ async function renderSidebarHTML() {
606608 // get rendered repos
607609 let renderedRepos = { } ;
608610
611+ // get all user-owned modified repos
612+ const userModRepos = Object . keys ( modifiedRepos ) . filter ( repo => repo . split ( '/' ) [ 0 ] === loggedUser ) ;
613+
609614 // if repositories exist
610- if ( resp . length > 0 || Object . keys ( modifiedRepos ) . length > 0 ) {
615+ if ( resp . length > 0 || userModRepos . length > 0 ) {
611616
612617 // show search button
613618 searchButton . classList . remove ( 'hidden' ) ;
You can’t perform that action at this time.
0 commit comments