use Object.assign
This commit is contained in:
parent
6e8d3e5bce
commit
b205f7746b
|
|
@ -185,13 +185,12 @@ export class NoteManager {
|
||||||
|
|
||||||
const files = note.fileIds.map(id => driveFileManager.get(id)?.value);
|
const files = note.fileIds.map(id => driveFileManager.get(id)?.value);
|
||||||
|
|
||||||
const result = {
|
const result = Object.assign({}, note, {
|
||||||
...note,
|
|
||||||
user: user.value,
|
user: user.value,
|
||||||
renote: renote?.value ?? undefined,
|
renote: renote?.value ?? undefined,
|
||||||
reply: reply?.value ?? undefined,
|
reply: reply?.value ?? undefined,
|
||||||
files: files.filter(file => file) as DriveFile[],
|
files: files.filter(file => file) as DriveFile[],
|
||||||
};
|
});
|
||||||
|
|
||||||
if (this.isDebuggerEnabled) console.log('NoteManager: compute note: not null', id, result);
|
if (this.isDebuggerEnabled) console.log('NoteManager: compute note: not null', id, result);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue