diff options
author | 2021-08-31 16:25:57 +0530 | |
---|---|---|
committer | 2021-08-31 16:25:57 +0530 | |
commit | dfae2d231e39c81827d08fd8834d736c5b3005b1 (patch) | |
tree | 5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/roundcube | |
parent | New recipe: odoo (diff) | |
download | ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.gz ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.zst ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.zip |
refactor: Use Ferdi.safeParseInt to ensure that parsing is done consistently in all recipes.
Diffstat (limited to 'recipes/roundcube')
-rw-r--r-- | recipes/roundcube/package.json | 2 | ||||
-rw-r--r-- | recipes/roundcube/webview.js | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/recipes/roundcube/package.json b/recipes/roundcube/package.json index 2bd8dba..d36a816 100644 --- a/recipes/roundcube/package.json +++ b/recipes/roundcube/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "roundcube", | 2 | "id": "roundcube", |
3 | "name": "Roundcube", | 3 | "name": "Roundcube", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "repository": "https://github.com/jonathanjuursema/franz-roundcube", | 5 | "repository": "https://github.com/jonathanjuursema/franz-roundcube", |
6 | "license": "MIT", | 6 | "license": "MIT", |
7 | "config": { | 7 | "config": { |
diff --git a/recipes/roundcube/webview.js b/recipes/roundcube/webview.js index 8a2ffef..ce9872a 100644 --- a/recipes/roundcube/webview.js +++ b/recipes/roundcube/webview.js | |||
@@ -3,8 +3,7 @@ module.exports = Ferdi => { | |||
3 | const directElements = document.querySelectorAll('.unreadcount'); | 3 | const directElements = document.querySelectorAll('.unreadcount'); |
4 | let direct = 0; | 4 | let direct = 0; |
5 | for (let i = 0; i < directElements.length; i += 1) { | 5 | for (let i = 0; i < directElements.length; i += 1) { |
6 | const n = parseInt(directElements[i].innerHTML); | 6 | direct += Ferdi.safeParseInt(directElements[i].innerHTML); |
7 | direct += isNaN(n) ? 0 : n; | ||
8 | } | 7 | } |
9 | Ferdi.setBadge(direct); | 8 | Ferdi.setBadge(direct); |
10 | }; | 9 | }; |