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:
rr- 2016-08-08 17:51:09 +02:00
parent 059bac877b
commit 5200f834f7

View file

@ -252,11 +252,11 @@ class Post extends events.EventTarget {
_canvasHeight: response.canvasHeight,
_fileSize: response.fileSize,
_flags: response.flags || [],
_tags: response.tags || [],
_notes: NoteList.fromResponse(response.notes || []),
_comments: CommentList.fromResponse(response.comments || []),
_relations: response.relations || [],
_flags: [...response.flags || []],
_tags: [...response.tags || []],
_notes: NoteList.fromResponse([...response.notes || []]),
_comments: CommentList.fromResponse([...response.comments || []]),
_relations: [...response.relations || []],
_score: response.score,
_favoriteCount: response.favoriteCount,