We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50ef80b commit 49b52beCopy full SHA for 49b52be
filebrowser.js
@@ -1344,10 +1344,22 @@ async function loadFileInHTML(fileEl, fileSha) {
1344
startLoading();
1345
}
1346
1347
+
1348
+ const fileDir = treeLoc.join();
1349
1350
// get file from git
1351
let resp = await git.getFile(treeLoc, fileName);
1352
1353
1354
+ // if switched file or directory while loading, return
1355
+ if (selectedFile.name !== fileName ||
1356
+ selectedFile.dir !== fileDir) {
1357
1358
+ return;
1359
1360
+ }
1361
1362
1363
// if file is over 1MB
1364
if (resp.size >= 1000000 && resp.content === '') {
1365
0 commit comments