Skip to content

Commit 1cca2b1

Browse files
committed
Make endOperation a no-op when no operation is active
Issue codemirror#5617
1 parent d4ec1da commit 1cca2b1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/display/operations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function startOperation(cm) {
4444
// Finish an operation, updating the display and signalling delayed events
4545
export function endOperation(cm) {
4646
let op = cm.curOp
47-
finishOperation(op, group => {
47+
if (op) finishOperation(op, group => {
4848
for (let i = 0; i < group.ops.length; i++)
4949
group.ops[i].cm.curOp = null
5050
endOperations(group)

0 commit comments

Comments
 (0)