client/models: fix modifying lists in post model
The lists in the post model (current state and original state) referred to the same objects, so that making changes to current state was seen as if no change has been made. This broke mass tag - it always thought there were no changes to post tags.
This commit is contained in:
parent
059bac877b
commit
5200f834f7
1 changed files with 5 additions and 5 deletions
|
@ -252,11 +252,11 @@ class Post extends events.EventTarget {
|
||||||
_canvasHeight: response.canvasHeight,
|
_canvasHeight: response.canvasHeight,
|
||||||
_fileSize: response.fileSize,
|
_fileSize: response.fileSize,
|
||||||
|
|
||||||
_flags: response.flags || [],
|
_flags: [...response.flags || []],
|
||||||
_tags: response.tags || [],
|
_tags: [...response.tags || []],
|
||||||
_notes: NoteList.fromResponse(response.notes || []),
|
_notes: NoteList.fromResponse([...response.notes || []]),
|
||||||
_comments: CommentList.fromResponse(response.comments || []),
|
_comments: CommentList.fromResponse([...response.comments || []]),
|
||||||
_relations: response.relations || [],
|
_relations: [...response.relations || []],
|
||||||
|
|
||||||
_score: response.score,
|
_score: response.score,
|
||||||
_favoriteCount: response.favoriteCount,
|
_favoriteCount: response.favoriteCount,
|
||||||
|
|
Loading…
Reference in a new issue