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/linkedin/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/linkedin/webview.js')
-rw-r--r-- | recipes/linkedin/webview.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/recipes/linkedin/webview.js b/recipes/linkedin/webview.js index f109b0d..1017d26 100644 --- a/recipes/linkedin/webview.js +++ b/recipes/linkedin/webview.js | |||
@@ -6,9 +6,8 @@ module.exports = Ferdi => { | |||
6 | count = document.querySelectorAll('.msg-conversation-card__unread-count').length; | 6 | count = document.querySelectorAll('.msg-conversation-card__unread-count').length; |
7 | } else { | 7 | } else { |
8 | const element = document.querySelector('.nav-item--messaging .nav-item__badge-count'); | 8 | const element = document.querySelector('.nav-item--messaging .nav-item__badge-count'); |
9 | |||
10 | if (element) { | 9 | if (element) { |
11 | count = parseInt(element.innerHTML, 10); | 10 | count = Ferdi.safeParseInt(element.innerHTML); |
12 | } | 11 | } |
13 | } | 12 | } |
14 | 13 | ||