Patched notifications to handle empty result.

This commit is contained in:
DebaucheryLibrarian 2021-05-15 03:06:57 +02:00
parent ae1b9c0d73
commit 7d974e6b89
1 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,14 @@ function initUiActions(store, _router) {
offset: (page - 1) * limit,
});
if (!notifications) {
return {
notifications: [],
totalCount: 0,
unseenCount: 0,
};
}
const curatedNotifications = notifications.nodes.map(notification => curateNotification(notification));
return {