aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/wechat/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:25:57 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:25:57 +0530
commitdfae2d231e39c81827d08fd8834d736c5b3005b1 (patch)
tree5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/wechat/webview.js
parentNew recipe: odoo (diff)
downloadferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.gz
ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.zst
ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.zip
refactor: Use Ferdi.safeParseInt to ensure that parsing is done consistently in all recipes.
Diffstat (limited to 'recipes/wechat/webview.js')
-rw-r--r--recipes/wechat/webview.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes/wechat/webview.js b/recipes/wechat/webview.js
index 874ab55..b1d8e31 100644
--- a/recipes/wechat/webview.js
+++ b/recipes/wechat/webview.js
@@ -13,8 +13,8 @@ module.exports = (Ferdi) => {
13 const reddot = item.querySelector('i.web_wechat_reddot_middle'); 13 const reddot = item.querySelector('i.web_wechat_reddot_middle');
14 const avatarImage = item.querySelector('img.img'); 14 const avatarImage = item.querySelector('img.img');
15 15
16 if (reddot && reddot.innerText) { 16 if (reddot) {
17 count = parseInt(reddot.innerText); 17 count = Ferdi.safeParseInt(reddot.innerText);
18 } 18 }
19 19
20 if (avatarImage && avatarImage.getAttribute('src').search('webwxgeticon') != -1) { 20 if (avatarImage && avatarImage.getAttribute('src').search('webwxgeticon') != -1) {