mefechoel / svelte-navigator

Simple, accessible routing for Svelte
Other
502 stars 39 forks source link

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'split') #49

Open imranmandalkazam opened 2 years ago

imranmandalkazam commented 2 years ago

I'm trying to navigate from one page to another using useNavigate Hook and got the error which says - "Uncaught (in promise) TypeError: Cannot read properties of null (reading 'split')"

It should navigate to the page without that error.

image

image

bobspace commented 1 year ago

I'm experiencing this too. Is there a fix or workaround?

bobspace commented 1 year ago

Sorry that I don't have full replication steps, but removing transitions from a svelte component fixes this error. Does that ring a bell to any of the authors here?

bobspace commented 1 year ago

In my case, I was able to narrow this down to an issue triggered by svelte transitions, which I documented in #92.

tipos commented 1 year ago

This is probably happening because unsupported value is being passed to <Link> element. E.g. <Link to="#a">Home</Link> -> upon clicking on this link, app will throw error OP is getting.