diff options
author | Nathanaƫl Houn <contact@nathanaelhoun.fr> | 2021-12-17 20:38:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 21:38:45 +0100 |
commit | 0f6b780c32aa1d8378d73ecd445a61e6fbc091ec (patch) | |
tree | 2b54f93a6cdfd605e2a151c6628ee1797a5e44ca /recipes/fastmail/webview.js | |
parent | Fix Rainloop unread counter (#788) (diff) | |
download | ferdium-recipes-0f6b780c32aa1d8378d73ecd445a61e6fbc091ec.tar.gz ferdium-recipes-0f6b780c32aa1d8378d73ecd445a61e6fbc091ec.tar.zst ferdium-recipes-0f6b780c32aa1d8378d73ecd445a61e6fbc091ec.zip |
Fix message count for Fastmail going to 0 (#789)
Diffstat (limited to 'recipes/fastmail/webview.js')
-rw-r--r-- | recipes/fastmail/webview.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/recipes/fastmail/webview.js b/recipes/fastmail/webview.js index 782963b..bcea4e7 100644 --- a/recipes/fastmail/webview.js +++ b/recipes/fastmail/webview.js | |||
@@ -9,10 +9,8 @@ module.exports = Ferdi => { | |||
9 | const inbox = document.querySelector( | 9 | const inbox = document.querySelector( |
10 | '.v-MailboxSource--inbox .v-MailboxSource-badge', | 10 | '.v-MailboxSource--inbox .v-MailboxSource-badge', |
11 | ); | 11 | ); |
12 | if (!inbox) { | 12 | |
13 | return; | 13 | const messages = inbox ? Ferdi.safeParseInt(inbox.textContent) : 0; |
14 | } | ||
15 | const messages = Ferdi.safeParseInt(inbox.textContent); | ||
16 | Ferdi.setBadge(messages); | 14 | Ferdi.setBadge(messages); |
17 | }; | 15 | }; |
18 | 16 | ||