Skip to content

Commit

Permalink
Make endOperation a no-op when no operation is active
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Oct 12, 2018
1 parent d4ec1da commit 1cca2b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/display/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function startOperation(cm) {
// Finish an operation, updating the display and signalling delayed events
export function endOperation(cm) {
let op = cm.curOp
finishOperation(op, group => {
if (op) finishOperation(op, group => {
for (let i = 0; i < group.ops.length; i++)
group.ops[i].cm.curOp = null
endOperations(group)
Expand Down

0 comments on commit 1cca2b1

Please sign in to comment.