refactor: use name instead of magic string

This commit is contained in:
Philipp Kühn
2021-04-20 23:12:46 +02:00
parent df43c1bc47
commit d720d77e8d

View File

@@ -107,7 +107,7 @@ export const CodeBlock = Node.create<CodeBlockOptions>({
const { empty, $anchor } = this.editor.state.selection const { empty, $anchor } = this.editor.state.selection
const isAtStart = $anchor.pos === 1 const isAtStart = $anchor.pos === 1
if (!empty || $anchor.parent.type.name !== 'codeBlock') { if (!empty || $anchor.parent.type.name !== this.name) {
return false return false
} }