diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-17 10:47:32 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-08-17 10:47:32 +0530 |
commit | 212d5846427ceeacfadf5aac3f381b532f4664a1 (patch) | |
tree | 7badcbb01930e77a2b2745e189e89323111ef470 /recipes/habitica/webview.js | |
parent | Moved all npm packages to the 'devDependencies' since there is no node-runtim... (diff) | |
download | ferdium-recipes-212d5846427ceeacfadf5aac3f381b532f4664a1.tar.gz ferdium-recipes-212d5846427ceeacfadf5aac3f381b532f4664a1.tar.zst ferdium-recipes-212d5846427ceeacfadf5aac3f381b532f4664a1.zip |
Cleanup of recipes to remove 'NaN' of badge variables since this is handled in the main program.
Diffstat (limited to 'recipes/habitica/webview.js')
-rwxr-xr-x | recipes/habitica/webview.js | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/recipes/habitica/webview.js b/recipes/habitica/webview.js index 02b2e2d..5eb1c1c 100755 --- a/recipes/habitica/webview.js +++ b/recipes/habitica/webview.js | |||
@@ -4,9 +4,6 @@ module.exports = (Franz) => { | |||
4 | const element = document.querySelector('.message-count'); | 4 | const element = document.querySelector('.message-count'); |
5 | if (element) { | 5 | if (element) { |
6 | count = Number(element.innerText); | 6 | count = Number(element.innerText); |
7 | if (Number.isNaN(count)) { | ||
8 | count = 0; | ||
9 | } | ||
10 | } | 7 | } |
11 | Franz.setBadge(count); | 8 | Franz.setBadge(count); |
12 | }; | 9 | }; |