From d3841b766f9d37d557646003899f67525c5f755f Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 5 Oct 2021 17:04:09 +0200 Subject: chore: add eslint-plugin-unicorn (#733) --- recipes/nextdoor/webview.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'recipes/nextdoor') diff --git a/recipes/nextdoor/webview.js b/recipes/nextdoor/webview.js index 503d9a4..809e368 100644 --- a/recipes/nextdoor/webview.js +++ b/recipes/nextdoor/webview.js @@ -1,9 +1,11 @@ module.exports = Ferdi => { const getMessages = () => { let unread = 0; - const notificationBadge = document.getElementsByClassName('notification-badge')[0]; + const notificationBadge = document.querySelectorAll( + '.notification-badge', + )[0]; if (notificationBadge != undefined) { - unread = Ferdi.safeParseInt(notificationBadge.innerText); + unread = Ferdi.safeParseInt(notificationBadge.textContent); } Ferdi.setBadge(unread); }; -- cgit v1.2.3-54-g00ecf