TheComputerM / svelte-materialify

A Material UI Design Component library for Svelte heavily inspired by vuetify.

Home Page:https://svelte-materialify.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with component in nested each

m1212e opened this issue · comments

Hi,

I've got this error
Uncaught (in promise) TypeError: Cannot read property 'm' of null at Object.mount [as m] (listElement.svelte:30) at mount_component (index.mjs:1412) at Object.mount [as m] (countryList.svelte:25) at insert (index.mjs:1168) at update_keyed_each (index.mjs:1210) at Object.update [as p] (countryList.svelte:23) at update_slot (index.mjs:91) at Object.update [as p] (List.svelte:26) at update (index.mjs:764) at flush (index.mjs:732)
which occurs when I use any svelte-materialify Component in a nested each block. Originally I thought this is a Svelte error, so this issue might be helpful to read.

Please provide a REPL, which should work with imports from 'svelte-materialify' (not /src).
Conduitry said it well.
at Object.mount sounds more like a svelte issue, Divider is doing nothing.

Oh, I dint't know that it works to include custom packages in REPL. Well that changes everything, here you go: https://svelte.dev/repl/508324d7e0f8498eabd156e50796805c?version=3.36.0
Sorry for the inconvenience. Just wait for a few moments and then the error should appear.

@m1212e
notes:
-the times after which this happens are pretty random

What's the error in dev mode? I don't think 'm' is the source name of anything, right?

But you could reproduce it, right? I just got this after about 30 seconds in:
message: "Uncaught (in promise): Cannot read property 'm' of null" stack: TypeError: Cannot read property 'm' of null at Object.mount [as m] (eval at handle_message (about:srcdoc:13:8), <anonymous>:3110:24) at mount_component (eval at handle_message (about:srcdoc:13:8), <anonymous>:723:30) at Object.mount [as m] (eval at handle_message (about:srcdoc:13:8), <anonymous>:3290:8) at insert (eval at handle_message (about:srcdoc:13:8), <anonymous>:663:19) at update_keyed_each (eval at handle_message (about:srcdoc:13:8), <anonymous>:692:17) at Object.update [as p] (eval at handle_message (about:srcdoc:13:8), <anonymous>:3387:23) at update_slot (eval at handle_message (about:srcdoc:13:8), <anonymous>:90:18) at Object.update [as p] (eval at handle_message (about:srcdoc:13:8), <anonymous>:1292:10) at update (eval at handle_message (about:srcdoc:13:8), <anonymous>:401:40) at flush (eval at handle_message (about:srcdoc:13:8), <anonymous>:369:17)

You're right. It's caused by svelte internal code. It's the error as posted in the first comment.

So it's either some bad code line somewhere or a svelte internal error, not materialify 👍

Ok, thank you. The I will reopen the other issue and close this one. Thanks!

Please take a look at the REPL, too. It's far better for anyone who wants to help + please next time do a minimum reproducible example.