aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/pleroma/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/pleroma/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/pleroma/webview.js')
-rw-r--r--recipes/pleroma/webview.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes/pleroma/webview.js b/recipes/pleroma/webview.js
index 07f2dc0..2c97ab3 100644
--- a/recipes/pleroma/webview.js
+++ b/recipes/pleroma/webview.js
@@ -143,9 +143,9 @@ module.exports = Ferdi => {
143 let directCount = 0; 143 let directCount = 0;
144 const matchArr = document.title.match(titleRegex); 144 const matchArr = document.title.match(titleRegex);
145 if (matchArr) { 145 if (matchArr) {
146 directCount = parseInt(matchArr[1], 10); 146 directCount = Ferdi.safeParseInt(matchArr[1]);
147 } 147 }
148 Ferdi.setBadge(directCount, 0); 148 Ferdi.setBadge(directCount);
149 }; 149 };
150 150
151 getInstanceLogo().then(({ logo, logoMask }) => { 151 getInstanceLogo().then(({ logo, logoMask }) => {