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/instagram/package.json | 2 +- recipes/instagram/webview.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'recipes/instagram') diff --git a/recipes/instagram/package.json b/recipes/instagram/package.json index 80391bc..8396da4 100644 --- a/recipes/instagram/package.json +++ b/recipes/instagram/package.json @@ -1,7 +1,7 @@ { "id": "instagram", "name": "Instagram", - "version": "2.2.0", + "version": "2.2.1", "license": "MIT", "config": { "serviceURL": "https://instagram.com/direct/inbox", diff --git a/recipes/instagram/webview.js b/recipes/instagram/webview.js index b6d9aa3..8db5852 100644 --- a/recipes/instagram/webview.js +++ b/recipes/instagram/webview.js @@ -5,7 +5,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de module.exports = (Ferdi) => { const getMessages = function getMessages() { const element = document.querySelector('a[href^="/direct/inbox"]'); - Ferdi.setBadge(element ? parseInt(element.innerText, 10) : 0); + Ferdi.setBadge(element ? Ferdi.safeParseInt(element.innerText) : 0); }; Ferdi.loop(getMessages); -- cgit v1.2.3-70-g09d2