mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix notifications in case no previous result is present
This commit is contained in:
parent
e9121705a4
commit
d42bc2ea3c
@ -149,7 +149,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
notifications: unionBy(
|
notifications: unionBy(
|
||||||
[newNotification],
|
[newNotification],
|
||||||
previousResult.notifications,
|
previousResult?.notifications,
|
||||||
(notification) => notification.id,
|
(notification) => notification.id,
|
||||||
).sort((a, b) => new Date(b.updatedAt) - new Date(a.updatedAt)),
|
).sort((a, b) => new Date(b.updatedAt) - new Date(a.updatedAt)),
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user