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

Missing empty section check #170

Open
gzalo opened this issue Nov 25, 2018 · 1 comment
Open

Missing empty section check #170

gzalo opened this issue Nov 25, 2018 · 1 comment

Comments

@gzalo
Copy link

gzalo commented Nov 25, 2018

Hi. There is a bug in this line:

If any other anchor changes the hash of the URL to one name that doesn't exist in the sectionAnchor array, the page will scroll to the first section!

scrollPage(section);

I think that a check like this is missing:

if(section.length>0){
 scrollPage(section);
}

Thanks,
Gonzalo

@alvarotrigo
Copy link
Owner

Thanks for reporting it!
Please feel free to provide a pull request and become a contributor to the project!

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