mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-02-06 09:55:50 +00:00
Remove unnecessary guard clause
- filter returns an empty array, and no notification is created if idsOfUsers is an empty array
This commit is contained in:
parent
7fe6fb110b
commit
54caaaaa0a
@ -53,7 +53,6 @@ const postAuthorOfComment = async (commentId, { context }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const notifyUsersOfMention = async (label, id, idsOfUsers, reason, context) => {
|
const notifyUsersOfMention = async (label, id, idsOfUsers, reason, context) => {
|
||||||
if (!(idsOfUsers && idsOfUsers.length)) return []
|
|
||||||
await validateNotifyUsers(label, reason)
|
await validateNotifyUsers(label, reason)
|
||||||
let mentionedCypher
|
let mentionedCypher
|
||||||
switch (reason) {
|
switch (reason) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user