diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-09-27 14:00:04 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-09-27 14:00:04 +0200 |
commit | fc18bea4bd125562038a5ca9c584729b54a44ab7 (patch) | |
tree | 9d1f2ddeefc479eccd70c1ba22a8b809b6b564e0 /view/js/main.js | |
parent | 01842a563de07e2d389c060bd196f0af21ed3549 (diff) | |
download | volse-hubzilla-fc18bea4bd125562038a5ca9c584729b54a44ab7.tar.gz volse-hubzilla-fc18bea4bd125562038a5ca9c584729b54a44ab7.tar.bz2 volse-hubzilla-fc18bea4bd125562038a5ca9c584729b54a44ab7.zip |
catch js error if the notification mid is for e.g. a like and class .item_123def... does not exist
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/view/js/main.js b/view/js/main.js index b5bbd57b5..c1536bce8 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -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 - 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'); if($('.collapsed-comments').length) { var scrolltoid = $('.collapsed-comments').attr('id').substring(19); |