svelte-navigator icon indicating copy to clipboard operation
svelte-navigator copied to clipboard

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

Open imranmandalkazam opened this issue 3 years ago • 4 comments

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

  • OS: Windows 11
  • Browser: Chrome
  • Version 95.0.4638.69 (Official Build) (64-bit)

imranmandalkazam avatar Nov 15 '21 14:11 imranmandalkazam

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

bobspace avatar Sep 14 '22 20:09 bobspace

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 avatar Sep 14 '22 21:09 bobspace

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

bobspace avatar Sep 14 '22 21:09 bobspace

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.

tipos avatar Oct 11 '22 06:10 tipos