Skip to content

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

Open
@ArmorDarks

Description

@ArmorDarks

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions