From fe15a1633f268c029376cb80dd7d621f0c8012ad Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sun, 15 May 2016 22:19:46 +0300 Subject: [PATCH] update_right_panel_unread_count() bug fix. Now it counts comments on any tree level. --- chrome_point_plus/js/point-plus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome_point_plus/js/point-plus.js b/chrome_point_plus/js/point-plus.js index 6585c12..8420007 100644 --- a/chrome_point_plus/js/point-plus.js +++ b/chrome_point_plus/js/point-plus.js @@ -734,7 +734,7 @@ function create_comment_elements(commentData, onCommentCreated) { * @param {?object} $span jQuery object of unread count */ function update_right_panel_unread_count($span) { - var unread_count = $('#comments').children('div.post.unread').length; + var unread_count = $('#comments').find('div.post.unread').length; if (typeof $span === 'undefined') { $span = $('#pp-unread-count');