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/roundcube/webview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recipes/roundcube') diff --git a/recipes/roundcube/webview.js b/recipes/roundcube/webview.js index c59da2f..08c6a95 100644 --- a/recipes/roundcube/webview.js +++ b/recipes/roundcube/webview.js @@ -2,8 +2,8 @@ module.exports = Ferdi => { const getMessages = () => { const directElements = document.querySelectorAll('.unreadcount'); let direct = 0; - for (let i = 0; i < directElements.length; i += 1) { - direct += Ferdi.safeParseInt(directElements[i].innerHTML); + for (const directElement of directElements) { + direct += Ferdi.safeParseInt(directElement.textContent); } Ferdi.setBadge(direct); }; -- cgit v1.2.3-70-g09d2