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
|
@ -70,7 +70,7 @@ export class DeleteAccountProcessorService {
|
|||
break;
|
||||
}
|
||||
|
||||
cursor = notes[notes.length - 1].id;
|
||||
cursor = notes.at(-1)?.id ?? null;
|
||||
|
||||
await this.notesRepository.delete(notes.map(note => note.id));
|
||||
|
||||
|
@ -101,7 +101,7 @@ export class DeleteAccountProcessorService {
|
|||
break;
|
||||
}
|
||||
|
||||
cursor = files[files.length - 1].id;
|
||||
cursor = files.at(-1)?.id ?? null;
|
||||
|
||||
for (const file of files) {
|
||||
await this.driveService.deleteFileSync(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue