From 0f6b780c32aa1d8378d73ecd445a61e6fbc091ec Mon Sep 17 00:00:00 2001 From: Nathanaƫl Houn Date: Fri, 17 Dec 2021 20:38:45 +0000 Subject: Fix message count for Fastmail going to 0 (#789) --- recipes/fastmail/webview.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'recipes') 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 => { const inbox = document.querySelector( '.v-MailboxSource--inbox .v-MailboxSource-badge', ); - if (!inbox) { - return; - } - const messages = Ferdi.safeParseInt(inbox.textContent); + + const messages = inbox ? Ferdi.safeParseInt(inbox.textContent) : 0; Ferdi.setBadge(messages); }; -- cgit v1.2.3-54-g00ecf