Merge pull request #327 from nextcloud/fix/new-answer-debounce

This commit is contained in:
John Molakvoæ 2020-05-01 13:59:31 +02:00 committed by GitHub
commit 5151a46b9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,6 +79,10 @@ export default {
// Dispatched for creation. Marked as synced
this.answer.local = false
const newAnswer = await this.debounceCreateAnswer(answer)
// Forward changes, but use current answer.text to avoid erasing
// any in-between changes while creating the answer
Object.assign(newAnswer, { text: this.$refs.input.value })
this.$emit('update:answer', answer.id, newAnswer)
} else {
this.debounceUpdateAnswer(answer)