From dfae2d231e39c81827d08fd8834d736c5b3005b1 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Tue, 31 Aug 2021 16:25:57 +0530 Subject: refactor: Use Ferdi.safeParseInt to ensure that parsing is done consistently in all recipes. --- recipes/pleroma/package.json | 2 +- recipes/pleroma/webview.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'recipes/pleroma') diff --git a/recipes/pleroma/package.json b/recipes/pleroma/package.json index 3993249..5a4fdf9 100644 --- a/recipes/pleroma/package.json +++ b/recipes/pleroma/package.json @@ -1,7 +1,7 @@ { "id": "pleroma", "name": "Pleroma", - "version": "1.1.1", + "version": "1.1.2", "license": "MIT", "config": { "hasCustomUrl": true 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 => { let directCount = 0; const matchArr = document.title.match(titleRegex); if (matchArr) { - directCount = parseInt(matchArr[1], 10); + directCount = Ferdi.safeParseInt(matchArr[1]); } - Ferdi.setBadge(directCount, 0); + Ferdi.setBadge(directCount); }; getInstanceLogo().then(({ logo, logoMask }) => { -- cgit v1.2.3-70-g09d2