use Object.assign

This commit is contained in:
tamaina 2023-08-12 12:56:37 +00:00
parent 6e8d3e5bce
commit b205f7746b
1 changed files with 2 additions and 3 deletions

View File

@ -185,13 +185,12 @@ export class NoteManager {
const files = note.fileIds.map(id => driveFileManager.get(id)?.value);
const result = {
...note,
const result = Object.assign({}, note, {
user: user.value,
renote: renote?.value ?? undefined,
reply: reply?.value ?? undefined,
files: files.filter(file => file) as DriveFile[],
};
});
if (this.isDebuggerEnabled) console.log('NoteManager: compute note: not null', id, result);