diff options
author | 2021-08-31 16:25:57 +0530 | |
---|---|---|
committer | 2021-08-31 16:25:57 +0530 | |
commit | dfae2d231e39c81827d08fd8834d736c5b3005b1 (patch) | |
tree | 5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/telegram-react/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/telegram-react/webview.js')
-rw-r--r-- | recipes/telegram-react/webview.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes/telegram-react/webview.js b/recipes/telegram-react/webview.js index b6240ff..c6111ee 100644 --- a/recipes/telegram-react/webview.js +++ b/recipes/telegram-react/webview.js | |||
@@ -5,7 +5,7 @@ module.exports = Ferdi => { | |||
5 | if (elements) { | 5 | if (elements) { |
6 | for (let i = 0; i < elements.length; i += 1) { | 6 | for (let i = 0; i < elements.length; i += 1) { |
7 | if (elements[i].querySelector('.unread') && elements[i].querySelector('.unread').innerHTML !== 0) { | 7 | if (elements[i].querySelector('.unread') && elements[i].querySelector('.unread').innerHTML !== 0) { |
8 | count += parseInt(elements[i].querySelector('.unread').innerHTML); | 8 | count += Ferdi.safeParseInt(elements[i].querySelector('.unread').innerHTML); |
9 | } | 9 | } |
10 | } | 10 | } |
11 | } | 11 | } |