Skip to content

Commit f6dd622

Browse files
committed
fix: render until container exists
1 parent 84249d1 commit f6dd622

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/main.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,13 @@ function run() {
2525
)
2626
}
2727

28-
window.addEventListener('load', run)
28+
window.addEventListener('load', () => {
29+
const timer = setInterval(() => {
30+
try {
31+
run()
32+
clearInterval(timer)
33+
} catch (error) {
34+
// ignore
35+
}
36+
}, 500)
37+
})

0 commit comments

Comments
 (0)