From 42aa58bc68bba20ebfc75add0ea4dfdf53f94753 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 22 Dec 2024 16:41:42 +0200 Subject: [PATCH] fix errors related to selection --- src/components/mention_link/mention_link.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js index 6515bd11..4e1ec23d 100644 --- a/src/components/mention_link/mention_link.js +++ b/src/components/mention_link/mention_link.js @@ -53,7 +53,9 @@ const MentionLink = { this.$router.push(link) }, handleSelection () { - this.hasSelection = document.getSelection().containsNode(this.$refs.full, true) + if (this.$refs.full) { + this.hasSelection = document.getSelection().containsNode(this.$refs.full, true) + } } }, mounted () {