Skip to content

Commit 94fe1b1

Browse files
committed
Update live-view.js
1 parent 8ab6590 commit 94fe1b1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

live-view/live-view.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ async function setupLiveView() {
257257
} else { // else, load file from modifiedFiles object
258258

259259
changeSelectedFile(modFile.dir, modFile.sha, modFile.name, modFile.content, modFile.lang,
260-
modFile.caretPos, modFile.scrollPos, false);
260+
modFile.caretPos, modFile.scrollPos, modFile.eclipsed);
261261

262262
}
263263

@@ -289,10 +289,12 @@ async function setupLiveView() {
289289

290290

291291
// if not logged in
292-
// or repository is public
293-
// and fetching an HTML file
292+
// or repository is public,
293+
// file is not modified,
294+
// and the file is HTML
294295
if ((gitToken === ''
295296
|| (repoObj && !repoObj.private))
297+
&& !modFile
296298
&& getFileType(fileName) === 'html') {
297299

298300
// get public file from git

0 commit comments

Comments
 (0)