File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1058,7 +1058,8 @@ async function loadFileInHTML(fileEl, fileSha) {
10581058
10591059
10601060 // if file is not modified; fetch from Git
1061- if ( ! modifiedFiles [ fileSha ] ) {
1061+ if ( ! modifiedFiles [ fileSha ]
1062+ || ( modifiedFiles [ fileSha ] && modifiedFiles [ fileSha ] . dir !== treeLoc . join ( ',' ) ) {
10621063
10631064 // if not already loading, start loading
10641065 if ( loader . style . opacity != '1' ) {
@@ -2481,6 +2482,13 @@ function protectUnsavedCode() {
24812482 // load file
24822483 loadFileInHTML ( selectedElSha , getAttr ( selectedElSha , 'sha' ) ) ;
24832484
2485+ } else if ( selBranch !== branch ) {
2486+
2487+ // if selected file is from another branch
2488+
2489+ // load file
2490+ loadFileInHTML ( selectedElSha , getAttr ( selectedElSha , 'sha' ) ) ;
2491+
24842492 }
24852493
24862494 }
You can’t perform that action at this time.
0 commit comments