Svelte: Uncaught TypeError: Cannot read property 'd' of null {#each}

Created on 14 Jun 2019  路  3Comments  路  Source: sveltejs/svelte

Hi, sorry for my english I'm French. I have a reccurent problem that happen on few {#each} randomly, I don't know how to trigger the event that create this bug.

This is my code :

{#if windowWidth > 1279}
   {#each configs[selectedConfig].bakusdetails as item, i}
          {#if item.title && item.description}
            {#if idShow == i || idShow === undefined}
              <div
                in:fade={{ duration: TRANSITION_DURATION(), delay: i * 300 + 100 }}
                out:fade={{ duration: TRANSITION_DURATION(), delay: i + 100 }}>
                <BakusItem
                  {item}
                  id={i}
                  on:notify={callbackFunction}
                  on:stopAnimate={resetInterval}
                  on:playAnimate={createInterval} />
              </div>
            {/if}
          {/if}
        {/each}
      {/if}

And this is the error

Uncaught TypeError: Cannot read property 'd' of null
    at Bakus.svelte:346
    at run (index.mjs:18)
    at Array.forEach (<anonymous>)
    at run_all (index.mjs:24)
    at Array.<anonymous> (index.mjs:704)
    at index.mjs:95
    at Set.forEach (<anonymous>)
    at run_tasks (index.mjs:94)

And on others {#each} blocks I have also

Cannot read property 'i' of undefined at Object.i

Do you have any ideas ?
Thank you

Most helpful comment

Yup, I imagine this was also fixed by #3172. Closing.

All 3 comments

I wonder whether this is the same root issue as #2668

@Conduitry

I was getting this same bug, and then I realized it's only happening on version differences.

NOT WORKING on v3.5.1: https://svelte.dev/repl/8b509a8b6808468a95befc785bd668f5?version=3.5.1

EXACT SAME CODE working on v3.6.7: https://svelte.dev/repl/8b509a8b6808468a95befc785bd668f5?version=3.6.7

This bug might have fixed itself. 馃榿

Yup, I imagine this was also fixed by #3172. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidcallanan picture davidcallanan  路  3Comments

mmjmanders picture mmjmanders  路  3Comments

lnryan picture lnryan  路  3Comments

rob-balfre picture rob-balfre  路  3Comments

noypiscripter picture noypiscripter  路  3Comments