aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nextcloud-calendar/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/nextcloud-calendar/webview.js')
-rw-r--r--recipes/nextcloud-calendar/webview.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/recipes/nextcloud-calendar/webview.js b/recipes/nextcloud-calendar/webview.js
index 84c55f2..49ed705 100644
--- a/recipes/nextcloud-calendar/webview.js
+++ b/recipes/nextcloud-calendar/webview.js
@@ -1,12 +1,15 @@
1const _path = _interopRequireDefault(require('path')); 1const _path = _interopRequireDefault(require('path'));
2 2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj };
5}
4 6
5module.exports = Ferdium => { 7module.exports = Ferdium => {
6 const getMessages = () => { 8 const getMessages = () => {
7 const direct = document.querySelectorAll( 9 const directSelector = document.querySelectorAll(
8 '.notifications .notification-wrapper .notification[object_type="dav"]', 10 '.notifications .notification-wrapper .notification[object_type="dav"]',
9 ).length; 11 );
12 const direct = directSelector ? Ferdium.safeParseInt(selector.length) : 0;
10 13
11 Ferdium.setBadge(direct); 14 Ferdium.setBadge(direct);
12 }; 15 };