Skip to content

Commit

Permalink
Attempt to fix parentNode null
Browse files Browse the repository at this point in the history
In some scenarios a null error can occur (see below) - think it may be this issue and resolution: sveltejs/svelte#6037 (comment)

index.mjs:199 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'removeChild')
    at v (index.mjs:199:21)
    at Object.d (ChannelElement.svelte:47:58)
    at Object.d (ChannelElement.svelte:46:9)
    at index.mjs:812:27
    at n (index.mjs:18:12)
    at Array.forEach (<anonymous>)
    at i (index.mjs:24:9)
    at nt (index.mjs:793:9)
    at Object.p (ChannelElement.svelte:40:47)
    at X (index.mjs:764:36)
  • Loading branch information
Skovvart committed Jan 31, 2022
1 parent 361188a commit 376dc6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ChannelElement.svelte
Expand Up @@ -44,7 +44,9 @@
<div class="shows" tabindex="0">
{#if shows?.length}
{#each shows as show (show.id + show.start)}
<ShowElement {channel} {show} lastShow={show === lastShow} />
<div>
<ShowElement {channel} {show} lastShow={show === lastShow} />
</div>
{/each}
{:else}
<p>(Ingen programmer at vise)</p>
Expand Down

0 comments on commit 376dc6d

Please sign in to comment.