Skip to content

Commit 953838c

Browse files
committed
Update live-view.js
1 parent 94fe1b1 commit 953838c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

live-view/live-view.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,15 @@ async function setupLiveView() {
288288
const repoObj = modifiedRepos[treeLoc[0] + '/' + treeLoc[1].split(':')[0]];
289289

290290

291-
// if not logged in
292-
// or repository is public,
291+
// if repository is public,
293292
// file is not modified,
294-
// and the file is HTML
295-
if ((gitToken === ''
296-
|| (repoObj && !repoObj.private))
297-
&& !modFile
298-
&& getFileType(fileName) === 'html') {
293+
// and file is HTML
294+
295+
const repoIsPublic = ((gitToken === '') || (repoObj && !repoObj.private));
296+
297+
if (repoIsPublic &&
298+
!modFile &&
299+
getFileType(fileName) === 'html') {
299300

300301
// get public file from git
301302
fileContent = await git.getPublicFile(treeLoc, fileName);

0 commit comments

Comments
 (0)