diff --git a/jquery.jscroll.js b/jquery.jscroll.js index 829bdb7..b12e64e 100644 --- a/jquery.jscroll.js +++ b/jquery.jscroll.js @@ -99,7 +99,7 @@ innerTop = $inner.length ? $inner.offset().top : 0, iTotalHeight = Math.ceil(iTopHeight - innerTop + _$scroll.height() + iContainerTop); - if (!data.waiting && iTotalHeight + _options.padding >= $inner.outerHeight()) { + if (typeof(data) !== 'undefined' && !data.waiting && iTotalHeight + _options.padding >= $inner.outerHeight()) { //data.nextHref = $.trim(data.nextHref + ' ' + _options.contentSelector); _debug('info', 'jScroll:', $inner.outerHeight() - iTotalHeight, 'from bottom. Loading next request...'); return _load(); @@ -206,4 +206,4 @@ var jscroll = new jScroll($this, m); }); }; -})(jQuery); \ No newline at end of file +})(jQuery);