We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2738b1c commit 073d92fCopy full SHA for 073d92f
src/selection-watcher.js
@@ -46,7 +46,7 @@ export default class SelectionWatcher {
46
// rangeCount is 0 or 1 in all browsers except firefox
47
// firefox can work with multiple ranges
48
// (on a mac hold down the command key to select multiple ranges)
49
- if (this.selection.rangeCount && successfulSync) {
+ if (this.selection?.rangeCount && successfulSync) {
50
const range = this.selection.getRangeAt(0)
51
const hostNode = parser.getHost(range.commonAncestorContainer)
52
if (hostNode) return new RangeContainer(hostNode, range)
0 commit comments