mefechoel / svelte-navigator

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

Possible missing null check #12

Closed mmrath closed 4 years ago

mmrath commented 4 years ago

Describe the bug

actions.js:55 Uncaught TypeError: Cannot read property 'hasAttribute' of null
    at actions.js:55
    at HTMLDivElement.handleClick (actions.js:12)

https://github.com/mefechoel/svelte-navigator/blob/6562b61d5d51dea451350b93d38e4be5c81b15a7/src/actions.js#L55

To Reproduce Steps to reproduce the behaviour:

  1. Use use:links on the top level element
  2. Click on anywhere on the page that is not a child of an anchor <a> element
mefechoel commented 4 years ago

Good catch, thanks for submitting!

mefechoel commented 4 years ago

Fixed in 3.0.11