diff options
Diffstat (limited to 'uncompressed/nextdoor/webview.js')
-rw-r--r-- | uncompressed/nextdoor/webview.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/uncompressed/nextdoor/webview.js b/uncompressed/nextdoor/webview.js index c17e99d..e20c6b5 100644 --- a/uncompressed/nextdoor/webview.js +++ b/uncompressed/nextdoor/webview.js | |||
@@ -2,7 +2,11 @@ | |||
2 | 2 | ||
3 | module.exports = Franz => { | 3 | module.exports = Franz => { |
4 | const getMessages = function getMessages() { | 4 | const getMessages = function getMessages() { |
5 | const unread = document.getElementsByClassName('notification-badge')[0].innerText; | 5 | var unread = 0 |
6 | const notificationBadge = document.getElementsByClassName('notification-badge')[0] | ||
7 | if (notificationBadge != undefined) { | ||
8 | unread = notificationBadge.innerText; | ||
9 | } | ||
6 | Franz.setBadge(parseInt(unread, 10)); | 10 | Franz.setBadge(parseInt(unread, 10)); |
7 | }; | 11 | }; |
8 | 12 | ||