diff --git a/src/trumbowyg.js b/src/trumbowyg.js
index <HASH>..<HASH> 100644
--- a/src/trumbowyg.js
+++ b/src/trumbowyg.js
@@ -1739,7 +1739,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
 
             // Fix IE11 Error 'Could not complete the operation due to error 800a025e'.
             // https://stackoverflow.com/questions/16160996/could-not-complete-the-operation-due-to-error-800a025e
-            if (documentSelection.getRangeAt(0).getClientRects.length > 0) {
+            if (documentSelection.rangeCount > 0 && documentSelection.getRangeAt(0).getClientRects.length > 0) {
                 documentSelection.removeAllRanges();
             }
             documentSelection.addRange(range || savedRange);
Update for fix IE<I> Error Could not complete the operation

More safest version.