Permalink
Browse files

Prevents “undefined is null or not an object” error in IE, where .scr…

…ollTop() was being called before the body was ready.
  • Loading branch information...
1 parent 078d317 commit dec502d2c88de4031316143696f765b216f1ee76 @Wilto Wilto committed Sep 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/jquery.mobile.navigation.js
@@ -424,7 +424,7 @@
var active = $.mobile.urlHistory.getActive();
if( active ) {
- var lastScroll = scrollElem.scrollTop();
+ var lastScroll = scrollElem && scrollElem.scrollTop();
// Set active page's lastScroll prop.
// If the location we're scrolling to is less than minScrollBack, let it go.

0 comments on commit dec502d

Please sign in to comment.