diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index 37f5e5d9cf..d1961a29a6 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -201,7 +201,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator var selection = window.getSelection ? window.getSelection() : document.selection.createRange(); var content = button.parents('[component="post"]').find('[component="post/content"]').get(0); - if (selection.containsNode(content, true)) { + if (content && selection.containsNode(content, true)) { var bounds = document.createRange(); bounds.selectNodeContents(content); var range = selection.getRangeAt(0).cloneRange();