check for invalid active_post_id in moveToPost

This commit is contained in:
Andrew Dolgov 2006-12-07 06:07:46 +01:00
parent a6fc3ee596
commit d4eec882c0
1 changed files with 4 additions and 0 deletions

View File

@ -169,6 +169,10 @@ function moveToPost(mode) {
var prev_id; var prev_id;
var next_id; var next_id;
if (!document.getElementById('RROW-' + active_post_id)) {
active_post_id = false;
}
if (active_post_id == false) { if (active_post_id == false) {
next_id = getFirstVisibleHeadlineId(); next_id = getFirstVisibleHeadlineId();
prev_id = getLastVisibleHeadlineId(); prev_id = getLastVisibleHeadlineId();