fix missing info error

This commit is contained in:
Sam 2013-03-24 18:30:19 -07:00
parent 3f0251dc63
commit 6804c994f5
1 changed files with 3 additions and 0 deletions

View File

@ -370,6 +370,9 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, {
rows = $('.topic-post');
info = Discourse.Eyeline.analyze(rows);
// if we have no rows
if(!info) { return; }
// top on screen
if(info.top === 0 || info.onScreen[0] === 0 || info.bottom === 0) {
this.prevPage($(rows[0]));