mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 08:15:13 +00:00
catch js error if there are no collapsed comments
This commit is contained in:
parent
62229d0a49
commit
8bf03d21cd
1 changed files with 6 additions and 4 deletions
|
@ -654,11 +654,13 @@ 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');
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue