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/skype/package.json | 2 +- recipes/skype/webview.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'recipes/skype') diff --git a/recipes/skype/package.json b/recipes/skype/package.json index 57f4d87..342621c 100644 --- a/recipes/skype/package.json +++ b/recipes/skype/package.json @@ -1,7 +1,7 @@ { "id": "skype", "name": "Skype", - "version": "3.1.0", + "version": "3.1.1", "license": "MIT", "config": { "serviceURL": "https://web.skype.com/", diff --git a/recipes/skype/webview.js b/recipes/skype/webview.js index 9af7c2b..6e84d78 100644 --- a/recipes/skype/webview.js +++ b/recipes/skype/webview.js @@ -17,7 +17,9 @@ module.exports = (Ferdi, settings) => { if (elementContainer) { const element = elementContainer.querySelector('[data-text-as-pseudo-element]'); - count = parseInt(element.dataset.textAsPseudoElement, 10); + if (element && element.dataset) { + count = Ferdi.safeParseInt(element.dataset.textAsPseudoElement); + } } } } -- cgit v1.2.3-54-g00ecf