Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
antoninbeaufort opened this issue Jun 14, 2019 · 3 comments
Closed

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

antoninbeaufort opened this issue Jun 14, 2019 · 3 comments

Comments

@antoninbeaufort
Copy link

antoninbeaufort commented Jun 14, 2019

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

@Conduitry
Copy link
Member

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

@arxpoetica
Copy link
Member

@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. 😁

@Conduitry
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants