Skip to content

Commit 19d17e0

Browse files
committed
Merge pull request alvarotrigo#1014 from tgiunipero/master
avoid TypeError
2 parents 01db780 + 6dd4603 commit 19d17e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jquery.fullPage.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@
118118
silentScroll(0);
119119

120120
//scrolling the page to the section with no animation
121-
$('html, body').scrollTop(element.position().top);
121+
if (element.length) {
122+
$('html, body').scrollTop(element.position().top);
123+
}
122124
}
123125

124126
};

0 commit comments

Comments
 (0)