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/yandex-mail/webview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recipes/yandex-mail/webview.js') diff --git a/recipes/yandex-mail/webview.js b/recipes/yandex-mail/webview.js index 7a937a7..fff4602 100644 --- a/recipes/yandex-mail/webview.js +++ b/recipes/yandex-mail/webview.js @@ -2,8 +2,8 @@ module.exports = Ferdi => { const getMessages = () => { let count = 0; - if (document.getElementsByClassName('mail-LabelList-Item_count').length > 1) { - count = Ferdi.safeParseInt(document.getElementsByClassName('mail-LabelList-Item_count')[1].textContent); + if (document.querySelectorAll('.mail-LabelList-Item_count').length > 1) { + count = Ferdi.safeParseInt(document.querySelectorAll('.mail-LabelList-Item_count')[1].textContent); } Ferdi.setBadge(count); -- cgit v1.2.3-70-g09d2