From e22699cfccf76edd1fcad1e75d847476c7ca6a55 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 19 Aug 2017 21:08:06 -0700 Subject: bugfix and version --- ext/fg/js/document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/fg/js') diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js index 26c85b40..b1e71777 100644 --- a/ext/fg/js/document.js +++ b/ext/fg/js/document.js @@ -76,7 +76,7 @@ function docRangeFromPoint(point) { if (!document.caretRangeFromPoint) { document.caretRangeFromPoint = (x, y) => { const position = document.caretPositionFromPoint(x,y); - if (position) { + if (position && position.offsetNode) { const range = document.createRange(); range.setStart(position.offsetNode, position.offset); range.setEnd(position.offsetNode, position.offset); -- cgit v1.2.3