diff options
Diffstat (limited to 'recipes/whatsapp')
-rw-r--r-- | recipes/whatsapp/package.json | 2 | ||||
-rw-r--r-- | recipes/whatsapp/webview.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/recipes/whatsapp/package.json b/recipes/whatsapp/package.json index 360cc47..6d2a93e 100644 --- a/recipes/whatsapp/package.json +++ b/recipes/whatsapp/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "whatsapp", | 2 | "id": "whatsapp", |
3 | "name": "WhatsApp", | 3 | "name": "WhatsApp", |
4 | "version": "3.2.0", | 4 | "version": "3.2.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://web.whatsapp.com", | 7 | "serviceURL": "https://web.whatsapp.com", |
diff --git a/recipes/whatsapp/webview.js b/recipes/whatsapp/webview.js index 773caa8..9b979d2 100644 --- a/recipes/whatsapp/webview.js +++ b/recipes/whatsapp/webview.js | |||
@@ -36,7 +36,7 @@ module.exports = Ferdi => { | |||
36 | const chatElem = chatElems[i]; | 36 | const chatElem = chatElems[i]; |
37 | const unreadElem = chatElem.children[0].children[0].children[1].children[1].children[1]; | 37 | const unreadElem = chatElem.children[0].children[0].children[1].children[1].children[1]; |
38 | 38 | ||
39 | const countValue = parseInt(unreadElem.textContent) || 0; // Returns 0 in case of isNaN | 39 | const countValue = Ferdi.safeParseInt(unreadElem.textContent); |
40 | 40 | ||
41 | if (unreadElem.querySelectorAll('[data-icon=muted]').length === 0) { | 41 | if (unreadElem.querySelectorAll('[data-icon=muted]').length === 0) { |
42 | count += countValue; | 42 | count += countValue; |