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/protonet/package.json | 2 +- recipes/protonet/webview.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'recipes/protonet') diff --git a/recipes/protonet/package.json b/recipes/protonet/package.json index bc4554d..80923de 100755 --- a/recipes/protonet/package.json +++ b/recipes/protonet/package.json @@ -1,7 +1,7 @@ { "id": "protonet", "name": "protonet", - "version": "1.1.0", + "version": "1.1.1", "license": "MIT", "config": { "serviceURL": "https://{teamID}.protonet.info", diff --git a/recipes/protonet/webview.js b/recipes/protonet/webview.js index 9ada45a..497ee8c 100755 --- a/recipes/protonet/webview.js +++ b/recipes/protonet/webview.js @@ -1,7 +1,7 @@ module.exports = (Ferdi) => { const getMessages = () => { - const unreadPrivateMessages = parseInt($('.messages .unread-meeps').text()); - const unreadGroupMessages = parseInt($('.today .unread-meeps').text()); + const unreadPrivateMessages = Ferdi.safeParseInt($('.messages .unread-meeps').text()); + const unreadGroupMessages = Ferdi.safeParseInt($('.today .unread-meeps').text()); Ferdi.setBadge(unreadPrivateMessages + unreadGroupMessages); }; -- cgit v1.2.3-70-g09d2