diff options
author | 2021-08-31 16:25:57 +0530 | |
---|---|---|
committer | 2021-08-31 16:25:57 +0530 | |
commit | dfae2d231e39c81827d08fd8834d736c5b3005b1 (patch) | |
tree | 5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/simplenote/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/simplenote/webview.js')
-rw-r--r-- | recipes/simplenote/webview.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/recipes/simplenote/webview.js b/recipes/simplenote/webview.js index f109b0d..1017d26 100644 --- a/recipes/simplenote/webview.js +++ b/recipes/simplenote/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 | ||