Skip to content

Commit

Permalink
Merge pull request #162 from titoBouzout/patch-2
Browse files Browse the repository at this point in the history
check for "app" before trying to innerHTML it
  • Loading branch information
davedbase authored Apr 1, 2024
2 parents a4018d4 + 6fdcdb8 commit 4b0868f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/solid-repl/src/components/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ const generateHTML = (isDark: boolean, importMap: string) => `
const next = () => {
window.dispose?.();
window.dispose = undefined;
document.getElementById('app').innerHTML = "";
if(document.getElementById('app'))
document.getElementById('app').innerHTML = "";
console.clear();
Expand Down

0 comments on commit 4b0868f

Please sign in to comment.