forked from DebaucheryLibrarian/traxxx
Patched notifications to handle empty result.
This commit is contained in:
@@ -95,6 +95,14 @@ function initUiActions(store, _router) {
|
|||||||
offset: (page - 1) * limit,
|
offset: (page - 1) * limit,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!notifications) {
|
||||||
|
return {
|
||||||
|
notifications: [],
|
||||||
|
totalCount: 0,
|
||||||
|
unseenCount: 0,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const curatedNotifications = notifications.nodes.map(notification => curateNotification(notification));
|
const curatedNotifications = notifications.nodes.map(notification => curateNotification(notification));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user