Skip to content

Commit 5224970

Browse files
authored
Merge pull request #62 from unkrich/main
Example fix for accidental event listener fire and double init on fir…
2 parents 27de877 + 2973146 commit 5224970

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/terminal.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ function runRootTerminal(term) {
99
term.runDeepLink();
1010
term.prompt();
1111

12-
window.addEventListener("resize", term.resizeListener);
12+
window.on('load', () => {
13+
window.addEventListener("resize", term.resizeListener);
14+
});
1315

1416
term.onData(e => {
1517
if (term._initialized && !term.locked) {

0 commit comments

Comments
 (0)