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/teamwork-projects/webview.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'recipes/teamwork-projects') diff --git a/recipes/teamwork-projects/webview.js b/recipes/teamwork-projects/webview.js index aa3e7be..7d3e845 100644 --- a/recipes/teamwork-projects/webview.js +++ b/recipes/teamwork-projects/webview.js @@ -1,14 +1,14 @@ -module.exports = (Ferdi) => { +module.exports = Ferdi => { const getMessages = () => { let indirectCount = 0; - const badge = document.getElementById('numNotifs2'); + const badge = document.querySelector('#numNotifs2'); - if (badge && badge.innerText) { - indirectCount = Ferdi.safeParseInt(badge.innerText); + if (badge && badge.textContent) { + indirectCount = Ferdi.safeParseInt(badge.textContent); } Ferdi.setBadge(0, indirectCount); - } + }; Ferdi.loop(getMessages); }; -- cgit v1.2.3-70-g09d2