refactor: 可読性のため一部でArray.prototype.at
を使うように (#11274)
* refactor: `Array.prototype.at`を使うように * fixup! refactor: `Array.prototype.at`を使うように
This commit is contained in:
parent
c0dbc3b53f
commit
2b6dbd4fcb
19 changed files with 46 additions and 44 deletions
|
@ -181,7 +181,7 @@ export class ActivityPubServerService {
|
|||
undefined,
|
||||
inStock ? `${partOf}?${url.query({
|
||||
page: 'true',
|
||||
cursor: followings[followings.length - 1].id,
|
||||
cursor: followings.at(-1)!.id,
|
||||
})}` : undefined,
|
||||
);
|
||||
|
||||
|
@ -273,7 +273,7 @@ export class ActivityPubServerService {
|
|||
undefined,
|
||||
inStock ? `${partOf}?${url.query({
|
||||
page: 'true',
|
||||
cursor: followings[followings.length - 1].id,
|
||||
cursor: followings.at(-1)!.id,
|
||||
})}` : undefined,
|
||||
);
|
||||
|
||||
|
@ -398,7 +398,7 @@ export class ActivityPubServerService {
|
|||
})}` : undefined,
|
||||
notes.length ? `${partOf}?${url.query({
|
||||
page: 'true',
|
||||
until_id: notes[notes.length - 1].id,
|
||||
until_id: notes.at(-1)!.id,
|
||||
})}` : undefined,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue