diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/view/js/main.js b/view/js/main.js index 1c6798c36..b5bbd57b5 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -654,10 +654,12 @@ function updateConvItems(mode,data) { // auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode if(bParam_mid && mode == 'replace') { $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top }, 'slow'); - var scrolltoid = $('.collapsed-comments').attr('id').substring(19); - $('#collapsed-comments-' + scrolltoid).slideDown(); - $('#hide-comments-' + scrolltoid).html(aStr.showfewer); - $('#hide-comments-total-' + scrolltoid).hide(); + if($('.collapsed-comments').length) { + var scrolltoid = $('.collapsed-comments').attr('id').substring(19); + $('#collapsed-comments-' + scrolltoid).slideDown(); + $('#hide-comments-' + scrolltoid).html(aStr.showfewer); + $('#hide-comments-total-' + scrolltoid).hide(); + } } } |