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/webview.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'recipes/skype/webview.js') 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