Skip to content

Commit

Permalink
Prevent undo error from malformed range
Browse files Browse the repository at this point in the history
  • Loading branch information
lqez committed Dec 12, 2018
1 parent 2914322 commit 141f01b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/base/editing/History.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class History {

return {
contents: this.$editable.html(),
bookmark: (rng ? rng.bookmark(this.editable) : emptyBookmark),
bookmark: ((rng && rng.isOnEditable()) ? rng.bookmark(this.editable) : emptyBookmark),
};
}

Expand Down

0 comments on commit 141f01b

Please sign in to comment.