Skip to content

Commit 4da69e5

Browse files
authored
Merge pull request #18 from edvakf/fix/2019-08-21c
Fix/2019 08 21c
2 parents 347d28c + 5f2803a commit 4da69e5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

svelte/Main.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
onMount(() => {
2626
// follow scroll
2727
const interval = setInterval(() => {
28-
if (commandLogFrame.classList.contains('loading')) {
28+
if (commandLogFrame.classList.contains('loading') && commandLogFrame.contentDocument.body) {
2929
commandLogFrame.contentWindow.scrollTo(0, commandLogFrame.contentDocument.body.offsetHeight);
3030
}
3131
}, 200);
@@ -59,8 +59,13 @@
5959
enableAllButtons();
6060
}
6161
62+
let commits = null;
63+
6264
function loadCommits() {
63-
new Commits({
65+
if (commits) {
66+
commits.$destroy(); // without this, the commits iframe won't be reloaded.
67+
}
68+
commits = new Commits({
6469
target: commitLogFrame.contentDocument.querySelector('commits'),
6570
props: {
6671
project: status.currentProject,

0 commit comments

Comments
 (0)