refactor: use name instead of magic string
This commit is contained in:
@@ -107,7 +107,7 @@ export const CodeBlock = Node.create<CodeBlockOptions>({
|
||||
const { empty, $anchor } = this.editor.state.selection
|
||||
const isAtStart = $anchor.pos === 1
|
||||
|
||||
if (!empty || $anchor.parent.type.name !== 'codeBlock') {
|
||||
if (!empty || $anchor.parent.type.name !== this.name) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user