catch js error if the notification mid is for e.g. a like and class .item_123def... does not exist
This commit is contained in:
parent
01842a563d
commit
fc18bea4bd
@ -652,7 +652,8 @@ function updateConvItems(mode,data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode
|
// auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode
|
||||||
if(bParam_mid && mode == 'replace') {
|
if($('.item_' + bParam_mid.substring(0,32)).length && mode == 'replace') {
|
||||||
|
console.log($('.item_' + bParam_mid.substring(0,32)));
|
||||||
$('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top }, 'slow');
|
$('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top }, 'slow');
|
||||||
if($('.collapsed-comments').length) {
|
if($('.collapsed-comments').length) {
|
||||||
var scrolltoid = $('.collapsed-comments').attr('id').substring(19);
|
var scrolltoid = $('.collapsed-comments').attr('id').substring(19);
|
||||||
|
Reference in New Issue
Block a user