filterの改善
This commit is contained in:
@@ -222,7 +222,7 @@ export class NotificationEntityService implements OnModuleInit {
|
|||||||
user,
|
user,
|
||||||
reaction: reaction.reaction,
|
reaction: reaction.reaction,
|
||||||
};
|
};
|
||||||
}))).filter(r => r.user);
|
}))).filter(r => isNotNull(r.user));
|
||||||
// if all users have been deleted, don't show this notification
|
// if all users have been deleted, don't show this notification
|
||||||
if (!reactions.length) {
|
if (!reactions.length) {
|
||||||
return null;
|
return null;
|
||||||
@@ -243,7 +243,7 @@ export class NotificationEntityService implements OnModuleInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return this.userEntityService.pack(userId, { id: meId });
|
return this.userEntityService.pack(userId, { id: meId });
|
||||||
}))).filter(u => u);
|
}))).filter(isNotNull);
|
||||||
// if all users have been deleted, don't show this notification
|
// if all users have been deleted, don't show this notification
|
||||||
if (!users.length) {
|
if (!users.length) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user