diff options
author | 2021-08-31 16:25:57 +0530 | |
---|---|---|
committer | 2021-08-31 16:25:57 +0530 | |
commit | dfae2d231e39c81827d08fd8834d736c5b3005b1 (patch) | |
tree | 5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/aws-workmail | |
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/aws-workmail')
-rw-r--r-- | recipes/aws-workmail/package.json | 2 | ||||
-rw-r--r-- | recipes/aws-workmail/webview.js | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/recipes/aws-workmail/package.json b/recipes/aws-workmail/package.json index 5641f43..e407dd2 100644 --- a/recipes/aws-workmail/package.json +++ b/recipes/aws-workmail/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "amazon-work-mail", | 2 | "id": "amazon-work-mail", |
3 | "name": "Amazon WorkMail", | 3 | "name": "Amazon WorkMail", |
4 | "version": "1.1.0", | 4 | "version": "1.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://{teamID}.awsapps.com/mail", | 7 | "serviceURL": "https://{teamID}.awsapps.com/mail", |
diff --git a/recipes/aws-workmail/webview.js b/recipes/aws-workmail/webview.js index 5c77d79..944a15c 100644 --- a/recipes/aws-workmail/webview.js +++ b/recipes/aws-workmail/webview.js | |||
@@ -16,8 +16,7 @@ module.exports = (Ferdi) => { | |||
16 | let counter = 0; | 16 | let counter = 0; |
17 | 17 | ||
18 | for (let i = 0; i < nodes.length; i++) { | 18 | for (let i = 0; i < nodes.length; i++) { |
19 | const node = parseInt(nodes[i].innerText); | 19 | counter += Ferdi.safeParseInt(nodes[i].innerText); |
20 | counter += (node > 0) ? node : 0; | ||
21 | } | 20 | } |
22 | 21 | ||
23 | Ferdi.setBadge(counter); | 22 | Ferdi.setBadge(counter); |