diff options
Diffstat (limited to 'recipes/instagram/webview.js')
-rw-r--r-- | recipes/instagram/webview.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes/instagram/webview.js b/recipes/instagram/webview.js index e363ad3..c2a8433 100644 --- a/recipes/instagram/webview.js +++ b/recipes/instagram/webview.js | |||
@@ -7,7 +7,7 @@ function _interopRequireDefault(obj) { | |||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | const element = document.querySelector('a[href^="/direct/inbox"]'); | 9 | const element = document.querySelector('a[href^="/direct/inbox"]'); |
10 | Ferdium.setBadge(element ? Ferdium.safeParseInt(element.textContent) : 0); | 10 | Ferdium.setBadge(element.textContent ? Ferdium.safeParseInt(element.textContent) : 0); |
11 | }; | 11 | }; |
12 | 12 | ||
13 | Ferdium.loop(getMessages); | 13 | Ferdium.loop(getMessages); |