fix notifications in case no previous result is present

This commit is contained in:
Ulf Gebhardt 2023-07-07 07:19:52 +02:00
parent e9121705a4
commit d42bc2ea3c
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -149,7 +149,7 @@ export default {
return {
notifications: unionBy(
[newNotification],
previousResult.notifications,
previousResult?.notifications,
(notification) => notification.id,
).sort((a, b) => new Date(b.updatedAt) - new Date(a.updatedAt)),
}