pagePiling.js
pagePiling.js copied to clipboard
Missing empty section check
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!
https://github.com/alvarotrigo/pagePiling.js/blob/4f3de9c79948c254f38610bd321ca42e258782e9/jquery.pagepiling.js#L471
I think that a check like this is missing:
if(section.length>0){
scrollPage(section);
}
Thanks, Gonzalo
Thanks for reporting it! Please feel free to provide a pull request and become a contributor to the project!