Skip to content

Commit 0be308b

Browse files
committed
Pass view argument through autoJoin
FIX: Fix an issue in `autoJoin` that made it ignore a third argument if it was passed one. Closes ProseMirror/prosemirror#1211
1 parent 8f2593b commit 0be308b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ export function autoJoin(command, isJoinable) {
576576
let types = isJoinable
577577
isJoinable = node => types.indexOf(node.type.name) > -1
578578
}
579-
return (state, dispatch) => command(state, dispatch && wrapDispatchForJoin(dispatch, isJoinable))
579+
return (state, dispatch, view) => command(state, dispatch && wrapDispatchForJoin(dispatch, isJoinable), view)
580580
}
581581

582582
// :: (...[(EditorState, ?(tr: Transaction), ?EditorView) → bool]) → (EditorState, ?(tr: Transaction), ?EditorView) → bool

0 commit comments

Comments
 (0)