mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-24 19:59:02 +08:00
Fixed: Avoid mutating a prop directly
error message to reproduce (#2834)
This commit is contained in:
parent
807b4ba4e0
commit
d85444c310
@ -20,9 +20,11 @@ export class VueRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// prevents `Avoid mutating a prop directly` error message
|
// prevents `Avoid mutating a prop directly` error message
|
||||||
const originalSilent = Vue.config.silent
|
// Fix: `VueNodeViewRenderer` change vue Constructor `config.silent` not working
|
||||||
|
const currentVueConstructor = this.ref.$props.editor.contentComponent?.$options._base ?? Vue;
|
||||||
|
const originalSilent = currentVueConstructor.config.silent
|
||||||
|
|
||||||
Vue.config.silent = true
|
currentVueConstructor.config.silent = true
|
||||||
|
|
||||||
Object
|
Object
|
||||||
.entries(props)
|
.entries(props)
|
||||||
@ -30,7 +32,7 @@ export class VueRenderer {
|
|||||||
this.ref.$props[key] = value
|
this.ref.$props[key] = value
|
||||||
})
|
})
|
||||||
|
|
||||||
Vue.config.silent = originalSilent
|
currentVueConstructor.config.silent = originalSilent
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy(): void {
|
destroy(): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user