mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-12 01:01:25 +09:00
refactor(ApPersonService.ts
): type guardによるnon-null assertionの削除
This commit is contained in:
parent
a40ea8163e
commit
d276dabf26
@ -623,13 +623,13 @@ export class ApPersonService implements OnModuleInit {
|
||||
|
||||
// とりあえずidを別の時間で生成して順番を維持
|
||||
let td = 0;
|
||||
for (const note of featuredNotes.filter(note => note != null)) {
|
||||
for (const note of featuredNotes.filter((note): note is Note => note != null)) {
|
||||
td -= 1000;
|
||||
transactionalEntityManager.insert(UserNotePining, {
|
||||
id: this.idService.genId(new Date(Date.now() + td)),
|
||||
createdAt: new Date(),
|
||||
userId: user.id,
|
||||
noteId: note!.id,
|
||||
noteId: note.id,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user