Skip to content

Commit c3af988

Browse files
committed
fix: markRaw PQueue instance in AnswerInput to prevent Vue 3 proxy error
PQueue uses private class fields which are incompatible with Vue 3's Proxy-based reactivity. The queue doesn't need to be reactive anyway. Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
1 parent 6415d0c commit c3af988

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/Questions/AnswerInput.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ import axios from '@nextcloud/axios'
8383
import { showError } from '@nextcloud/dialogs'
8484
import { generateOcsUrl } from '@nextcloud/router'
8585
import debounce from 'debounce'
86+
import { markRaw } from 'vue'
8687
import PQueue from 'p-queue'
8788
import NcActionButton from '@nextcloud/vue/components/NcActionButton'
8889
import NcActions from '@nextcloud/vue/components/NcActions'
@@ -271,7 +272,7 @@ export default {
271272
},
272273
273274
created() {
274-
this.queue = new PQueue({ concurrency: 1 })
275+
this.queue = markRaw(new PQueue({ concurrency: 1 }))
275276
276277
// As data instead of method, to have a separate debounce per AnswerInput
277278
this.debounceOnInput = debounce((event) => {

0 commit comments

Comments
 (0)