fix some typescript bugs
This commit is contained in:
@@ -36,13 +36,6 @@ export type ContentComponent = ComponentInternalInstance & {
|
||||
ctx: ComponentPublicInstance,
|
||||
}
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Editor {
|
||||
contentComponent: ContentComponent | null,
|
||||
vueRenderers: Map<string, VueRenderer>,
|
||||
}
|
||||
}
|
||||
|
||||
export class Editor extends CoreEditor {
|
||||
private reactiveState: Ref<EditorState>
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ export function VueNodeViewRenderer(component: Component, options?: Partial<VueN
|
||||
// try to get the parent component
|
||||
// this is important for vue devtools to show the component hierarchy correctly
|
||||
// maybe it’s `undefined` because <editor-content> isn’t rendered yet
|
||||
if (!props.editor.contentComponent) {
|
||||
if (!(props.editor as Editor).contentComponent) {
|
||||
return {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user