aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/wechat
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
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')
-rw-r--r--recipes/wechat/package.json2
-rw-r--r--recipes/wechat/webview.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/recipes/wechat/package.json b/recipes/wechat/package.json
index ec29d19..b8af764 100644
--- a/recipes/wechat/package.json
+++ b/recipes/wechat/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "wechat", 2 "id": "wechat",
3 "name": "WeChat", 3 "name": "WeChat",
4 "version": "1.1.0", 4 "version": "1.1.1",
5 "license": "MIT", 5 "license": "MIT",
6 "repository": "https://github.com/koma-private/recipe-wechat", 6 "repository": "https://github.com/koma-private/recipe-wechat",
7 "config": { 7 "config": {
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) {