deep-copy notes before syncing visibility
This commit is contained in:
parent
bac4d43773
commit
2bb7980fe7
1 changed files with 10 additions and 2 deletions
|
|
@ -167,8 +167,16 @@ export class NoteVisibilityService {
|
||||||
// Copy note since we mutate it below
|
// Copy note since we mutate it below
|
||||||
note = {
|
note = {
|
||||||
...note,
|
...note,
|
||||||
renote: note.renote ? { ...note.renote } : null,
|
renote: note.renote ? {
|
||||||
reply: note.reply ? { ...note.reply } : null,
|
...note.renote,
|
||||||
|
renote: note.renote.renote ? { ...note.renote.renote } : null,
|
||||||
|
reply: note.renote.reply ? { ...note.renote.reply } : null,
|
||||||
|
} : null,
|
||||||
|
reply: note.reply ? {
|
||||||
|
...note.reply,
|
||||||
|
renote: note.reply.renote ? { ...note.reply.renote } : null,
|
||||||
|
reply: note.reply.reply ? { ...note.reply.reply } : null,
|
||||||
|
} : null,
|
||||||
} as PopulatedNote;
|
} as PopulatedNote;
|
||||||
|
|
||||||
this.syncVisibility(note);
|
this.syncVisibility(note);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue