Skip to content

Commit c5d7dfc

Browse files
committed
Update live-view.js
1 parent c041036 commit c5d7dfc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

live-view/live-view.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ async function handleLiveViewRequest(requestPath) {
815815
let respObj;
816816

817817
// get repo obj from local storage
818-
const repoObj = modifiedRepos[treeLoc[0] + '/' + treeLoc[1].split(':')[0]];
818+
const repoObj = modifiedRepos[fileUser + '/' + fileRepo.split(':')[0]];
819819

820820

821821
// if not logged in
@@ -824,7 +824,7 @@ async function handleLiveViewRequest(requestPath) {
824824
|| (repoObj && !repoObj.private)) {
825825

826826
// if branch doesn't exist in tree
827-
if (!treeLoc[1].includes(':')) {
827+
if (!fileRepo.includes(':')) {
828828

829829
let defaultBranch;
830830

@@ -840,11 +840,11 @@ async function handleLiveViewRequest(requestPath) {
840840
}
841841

842842
// add branch to tree
843-
treeLoc[1] = treeLoc[1].split(':')[0] + ':' + defaultBranch;
843+
liveFileDir[1] = fileRepo.split(':')[0] + ':' + defaultBranch;
844844
saveTreeLocLS(treeLoc);
845845

846846
// update selected branch in local storage
847-
updateModRepoSelectedBranch((treeLoc[0] + '/' + treeLoc[1].split(':')[0]), defaultBranch);
847+
updateModRepoSelectedBranch((treeLoc[0] + '/' + fileRepo.split(':')[0]), defaultBranch);
848848

849849
}
850850

0 commit comments

Comments
 (0)