diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-31 16:25:57 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-08-31 16:25:57 +0530 |
commit | dfae2d231e39c81827d08fd8834d736c5b3005b1 (patch) | |
tree | 5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/xing/webview.js | |
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/xing/webview.js')
-rw-r--r-- | recipes/xing/webview.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/recipes/xing/webview.js b/recipes/xing/webview.js index 97daed2..9effe95 100644 --- a/recipes/xing/webview.js +++ b/recipes/xing/webview.js | |||
@@ -1,9 +1,6 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdi => { |
2 | function getUnreadConversations() { | 2 | function getUnreadConversations() { |
3 | let unreadConversations = 0; | 3 | Ferdi.setBadge(document.querySelector('#unread-conversations').innerHTML); |
4 | unreadConversations = parseInt(document.querySelector('#unread-conversations').innerHTML, 10); | ||
5 | |||
6 | Ferdi.setBadge(unreadConversations); | ||
7 | } | 4 | } |
8 | 5 | ||
9 | Ferdi.loop(getUnreadConversations); | 6 | Ferdi.loop(getUnreadConversations); |