server: replace Array.find with Array.some
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
This commit is contained in:
parent
ba2b7ef43c
commit
f7bd210316
1 changed files with 1 additions and 2 deletions
|
@ -150,7 +150,7 @@ async function findCascadingNotes(note: Note): Promise<Note[]> {
|
|||
|
||||
await Promise.all(replies.map(reply => {
|
||||
// only add unique notes
|
||||
if (cascadingNotes.find((x) => x.id === reply.id) != null) return;
|
||||
if (cascadingNotes.some((x) => x.id === reply.id)) return;
|
||||
|
||||
cascadingNotes.push(reply);
|
||||
return recursive(reply.id);
|
||||
|
@ -186,4 +186,3 @@ async function getMentionedRemoteUsers(note: Note): Promise<IRemoteUser[]> {
|
|||
where,
|
||||
}) as IRemoteUser[];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue