aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/bip/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/bip/webview.js')
-rw-r--r--recipes/bip/webview.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/recipes/bip/webview.js b/recipes/bip/webview.js
index 87a7c0a..89668d7 100644
--- a/recipes/bip/webview.js
+++ b/recipes/bip/webview.js
@@ -7,8 +7,7 @@ module.exports = Ferdi => {
7 const elements = document.querySelectorAll('.contact-list__message__unread-badge-counter'); 7 const elements = document.querySelectorAll('.contact-list__message__unread-badge-counter');
8 let count = 0; 8 let count = 0;
9 for (let i = 0; i < elements.length; i++) { 9 for (let i = 0; i < elements.length; i++) {
10 const countValue = parseInt(elements[i].textContent || '0', 10); 10 count += Ferdi.safeParseInt(elements[i].textContent);
11 count += countValue;
12 } 11 }
13 Ferdi.setBadge(count, 0); 12 Ferdi.setBadge(count, 0);
14 }; 13 };