From 70dd49740e8e82734fb0eac756392f2134a071c1 Mon Sep 17 00:00:00 2001 From: Lhcfl Date: Mon, 1 Apr 2024 11:34:57 +0800 Subject: [PATCH] chore: format --- packages/client/src/pages/note-history.vue | 28 ++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/packages/client/src/pages/note-history.vue b/packages/client/src/pages/note-history.vue index 423df90fdb..b9c0053bad 100644 --- a/packages/client/src/pages/note-history.vue +++ b/packages/client/src/pages/note-history.vue @@ -96,22 +96,20 @@ function convertNoteEditsToNotes(noteEdits: NoteEdit[]) { emojis: note.value.emojis, }; - return [now] - .concat(noteEdits) - .map((noteEdit: NoteEdit, index, arr): Note => { - return Object.assign({}, note.value, { - historyId: noteEdit.id, - // Conversion from updatedAt to createdAt - // The createdAt of a edition's content is actually the updatedAt of the previous one. - createdAt: arr[(index + 1) % arr.length].updatedAt, - text: noteEdit.text, - cw: noteEdit.cw, - _shouldInsertAd_: false, - files: noteEdit.files, - fileIds: noteEdit.fileIds, - emojis: note.value.emojis.concat(noteEdit.emojis), - }); + return [now].concat(noteEdits).map((noteEdit: NoteEdit, index, arr): Note => { + return Object.assign({}, note.value, { + historyId: noteEdit.id, + // Conversion from updatedAt to createdAt + // The createdAt of a edition's content is actually the updatedAt of the previous one. + createdAt: arr[(index + 1) % arr.length].updatedAt, + text: noteEdit.text, + cw: noteEdit.cw, + _shouldInsertAd_: false, + files: noteEdit.files, + fileIds: noteEdit.fileIds, + emojis: note.value.emojis.concat(noteEdit.emojis), }); + }); }