fix: editor don't has contentComponent attribute when suggestion onUpdate (#2916)

Co-authored-by: 周洋 <yang.zhou02@mihoyo.com>
This commit is contained in:
YoungChou 2022-06-23 22:19:32 +08:00 committed by GitHub
parent 940c00abb8
commit 6674e69b12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ export class VueRenderer {
// prevents `Avoid mutating a prop directly` error message
// Fix: `VueNodeViewRenderer` change vue Constructor `config.silent` not working
const currentVueConstructor = this.ref.$props.editor.contentComponent?.$options._base ?? Vue // eslint-disable-line
const currentVueConstructor = this.ref.$props.editor?.contentComponent?.$options._base ?? Vue // eslint-disable-line
const originalSilent = currentVueConstructor.config.silent
currentVueConstructor.config.silent = true