File tree Expand file tree Collapse file tree 1 file changed +13
-36
lines changed
Expand file tree Collapse file tree 1 file changed +13
-36
lines changed Original file line number Diff line number Diff line change @@ -72,21 +72,8 @@ async function renderSidebarHTML() {
7272 // get items in current tree from git
7373 resp = await git . getItems ( treeLoc ) ;
7474
75- } catch ( e ) {
76-
77- // if failed to get items,
78- // show login screen
79-
80- // stop loading
81- stopLoading ( ) ;
82-
83- alert ( 'Whoops, your Github login expired. Log in again?' ) ;
84-
85- sidebar . classList . add ( 'intro' ) ;
86-
87- return ;
88-
8975 }
76+
9077
9178 if ( resp . message == 'Not Found' ) {
9279
@@ -969,29 +956,19 @@ async function renderBranchMenuHTML(renderAll) {
969956 // save resp in HTML
970957 setAttr ( branchMenu , 'resp' , JSON . stringify ( cleanedResp ) ) ;
971958
959+ }
960+
961+
962+ // if repository has more than one branch,
963+ // show branch button
964+ if ( branchResp && branchResp . length > 1 ) {
965+
966+ sidebarBranch . classList . add ( 'visible' ) ;
967+
968+ } else {
972969
973- if ( branchResp . length > 1 ) {
974-
975- sidebarBranch . classList . add ( 'visible' ) ;
976-
977- } else {
978-
979- return ;
980-
981- }
982-
983- } else if ( branchResp ) {
984-
985- if ( branchResp . length > 1 ) {
986-
987- sidebarBranch . classList . add ( 'visible' ) ;
988-
989- } else {
990-
991- return ;
992-
993- }
994-
970+ return ;
971+
995972 }
996973
997974
You can’t perform that action at this time.
0 commit comments