We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53f26a7 commit 3f64ec7Copy full SHA for 3f64ec7
2 files changed
public/vendor/ot/codemirror-adapter.js
@@ -247,7 +247,7 @@ ot.CodeMirrorAdapter = (function (global) {
247
248
CodeMirrorAdapter.prototype.setSelection = function (selection) {
249
var ranges = [];
250
- for (var i = 0; i < selection.ranges.length; i++) {
+ for (var i = 0; selection && i < selection.ranges.length; i++) {
251
var range = selection.ranges[i];
252
ranges[i] = {
253
anchor: this.cm.posFromIndex(range.anchor),
0 commit comments