diff --git a/packages/core/src/commands/unsetAllMarks.ts b/packages/core/src/commands/unsetAllMarks.ts index 7742af63c..9d17202f5 100644 --- a/packages/core/src/commands/unsetAllMarks.ts +++ b/packages/core/src/commands/unsetAllMarks.ts @@ -20,13 +20,9 @@ export const unsetAllMarks: RawCommands['unsetAllMarks'] = () => ({ tr, state, d } if (dispatch) { - Object - .entries(state.schema.marks) - .forEach(([, mark]) => { - ranges.forEach(range => { - tr.removeMark(range.$from.pos, range.$to.pos, mark as any) - }) - }) + ranges.forEach(range => { + tr.removeMark(range.$from.pos, range.$to.pos) + }) } return true