Skip to content

Commit

Permalink
fix: fixes initial page load issue (closes #758)
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed May 30, 2023
1 parent fdebb1a commit 9104d06
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import * as sapper from '@sapper/app';

sapper.start({
target: document.querySelector('#sapper')
//
// <https://github.com/upptime/upptime/issues/758>
// if we do not use this then we need to move sapper at end of <body>
// <https://caniuse.com/domcontentloaded>
//
document.addEventListener('DOMContentLoaded', function() {
sapper.start({
target: document.querySelector('#sapper')
});
});

0 comments on commit 9104d06

Please sign in to comment.