Skip to content

Commit

Permalink
fix missing info error
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Mar 25, 2013
1 parent 3f0251d commit 6804c99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/discourse/views/topic_view.js
Expand Up @@ -370,6 +370,9 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, {
rows = $('.topic-post'); rows = $('.topic-post');
info = Discourse.Eyeline.analyze(rows); info = Discourse.Eyeline.analyze(rows);


// if we have no rows
if(!info) { return; }

// top on screen // top on screen
if(info.top === 0 || info.onScreen[0] === 0 || info.bottom === 0) { if(info.top === 0 || info.onScreen[0] === 0 || info.bottom === 0) {
this.prevPage($(rows[0])); this.prevPage($(rows[0]));
Expand Down

0 comments on commit 6804c99

Please sign in to comment.