From ffeb63c04385946dbafdb431ea6b683519978413 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Wed, 24 Nov 2021 16:19:39 +0530 Subject: refactor: Use 'Ferdi.safeParseInt' --- all.json | 2 +- recipes/good-reads/package.json | 2 +- recipes/good-reads/webview.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/all.json b/all.json index a2439e3..85e2da6 100644 --- a/all.json +++ b/all.json @@ -553,7 +553,7 @@ "featured": false, "id": "good-reads", "name": "Good Reads", - "version": "1.0.1", + "version": "1.0.2", "icons": { "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/good-reads/icon.svg" } diff --git a/recipes/good-reads/package.json b/recipes/good-reads/package.json index 7e68582..d581b4f 100644 --- a/recipes/good-reads/package.json +++ b/recipes/good-reads/package.json @@ -1,7 +1,7 @@ { "id": "good-reads", "name": "Good Reads", - "version": "1.0.1", + "version": "1.0.2", "license": "MIT", "config": { "serviceURL": "https://www.goodreads.com/" diff --git a/recipes/good-reads/webview.js b/recipes/good-reads/webview.js index 7fa5867..c1eabf8 100644 --- a/recipes/good-reads/webview.js +++ b/recipes/good-reads/webview.js @@ -4,7 +4,7 @@ module.exports = (Ferdi) => { ".siteHeader__topLevelItem--profileIcon .headerPersonalNav .modalTrigger .headerPersonalNav__icon .headerPersonalNav__flag" ); let notification = notificationBadge - ? Number.parseInt(notificationBadge.textContent) + ? Ferdi.safeParseInt(notificationBadge.textContent) : 0; Ferdi.setBadge(notification); -- cgit v1.2.3-54-g00ecf