Prevents “undefined is null or not an object” error in IE, where .scrollTop() was being called before the body was ready.

This commit is contained in:
Mat Marquis 2011-09-23 18:05:12 -04:00
parent 078d317e63
commit dec502d2c8

View file

@ -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.