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

Error in case of jumping to non-existing target #62

Open
ArmorDarks opened this issue Aug 18, 2017 · 1 comment
Open

Error in case of jumping to non-existing target #62

ArmorDarks opened this issue Aug 18, 2017 · 1 comment

Comments

@ArmorDarks
Copy link

Hi

Thanks for the great lib!

Following code:

jump(`#SOME-NOT-EXISTING-ID-ON-PAGE`)

will result in quite obscure error:

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null

I think error can be improved and if there is no target, it should state that no valid target has been received.

Another thing — is it per design that jump.js errors if query doesn't much any element? Though, it is workaraundable, just want to ensure that it isn't a bug.

Thanks!

@xrzhuang
Copy link

xrzhuang commented Mar 2, 2020

Has anyone else also noticed what jump(undefined!) does? It seems to me like it jumps to the bottom of the page?

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

2 participants