mirror of https://github.com/fantasticit/think.git
fix: fix jserror
parent
75d1dfa5e8
commit
776db2bc7f
|
@ -2,19 +2,19 @@ import { Node } from 'prosemirror-model';
|
||||||
import { EditorState } from 'prosemirror-state';
|
import { EditorState } from 'prosemirror-state';
|
||||||
|
|
||||||
export function isTitleNode(node: Node): boolean {
|
export function isTitleNode(node: Node): boolean {
|
||||||
return node.type.name === 'title';
|
return node && node.type.name === 'title';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isBulletListNode(node: Node): boolean {
|
export function isBulletListNode(node: Node): boolean {
|
||||||
return node.type.name === 'bulletList';
|
return node && node.type.name === 'bulletList';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isOrderedListNode(node: Node): boolean {
|
export function isOrderedListNode(node: Node): boolean {
|
||||||
return node.type.name === 'orderedList';
|
return node && node.type.name === 'orderedList';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isTodoListNode(node: Node): boolean {
|
export function isTodoListNode(node: Node): boolean {
|
||||||
return node.type.name === 'taskList';
|
return node && node.type.name === 'taskList';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isListNode(node: Node): boolean {
|
export function isListNode(node: Node): boolean {
|
||||||
|
|
Loading…
Reference in New Issue