From 38e163cec3b95e57698f537607ce85df6c77221d Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Mon, 6 Jan 2020 10:45:54 -0500 Subject: [PATCH] Ensure comment updated is reflected in Vue --- app/server/static/components/annotationMixin.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/server/static/components/annotationMixin.js b/app/server/static/components/annotationMixin.js index 39eb9d3e..e5d87de7 100644 --- a/app/server/static/components/annotationMixin.js +++ b/app/server/static/components/annotationMixin.js @@ -114,6 +114,9 @@ export default { this.comments = comments; } else if (commentId && hasText) { await HTTP.patch(`docs/${docId}/comments/${commentId}`, { text }); + const comments = this.comments.slice(); + comments[this.pageNumber].text = text; + this.comments = comments; } else { const response = await HTTP.post(`docs/${docId}/comments`, { text }); const comments = this.comments.slice();