Skip to content

Commit 23a12dd

Browse files
committed
Fix for selectionObjects in OT CodeMirror adapter might call on undefined
1 parent eaf9218 commit 23a12dd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

public/vendor/ot/codemirror-adapter.js

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ ot.CodeMirrorAdapter = (function (global) {
328328
return {
329329
clear: function () {
330330
for (var i = 0; i < selectionObjects.length; i++) {
331-
selectionObjects[i].clear();
331+
if (selectionObjects[i]) selectionObjects[i].clear();
332332
}
333333
}
334334
};

0 commit comments

Comments
 (0)