Commit 42c019a2 authored by Matthieu Fesselier's avatar Matthieu Fesselier

bugfix: return array when 1 notif - closes #11

parent a06ef51e
Pipeline #3288 passed with stage
in 28 seconds
...@@ -72,8 +72,11 @@ class SIBNotifications extends SIBTemplateElement { ...@@ -72,8 +72,11 @@ class SIBNotifications extends SIBTemplateElement {
} }
_getNotificationsList() { _getNotificationsList() {
let notificationsList = this.querySelector('#notifications-list') const notificationsList = this.querySelector('#notifications-list');
return notificationsList ? notificationsList.resource['ldp:contains'] : null if (!notificationsList) return null;
if (Array.isArray(notificationsList.resource['ldp:contains']))
return notificationsList.resource['ldp:contains'];
return [notificationsList.resource['ldp:contains']];
} }
_printError(error) { _printError(error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment