fix active check for ordered list, fix #78
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { findParentNode } from 'prosemirror-utils'
|
||||
|
||||
export default function (state, type, attrs) {
|
||||
export default function (state, type, attrs = {}) {
|
||||
const predicate = node => node.type === type
|
||||
const parent = findParentNode(predicate)(state.selection)
|
||||
|
||||
if (attrs === {} || !parent) {
|
||||
if (!Object.keys(attrs).length || !parent) {
|
||||
return !!parent
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user