Skip to content

Commit 65795d2

Browse files
committed
moved range check fix
1 parent 9f29a1e commit 65795d2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/At.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -286,17 +286,17 @@ export default {
286286
287287
const range = getPrecedingRange()
288288
289-
if (keep) {
290-
// exit the function if the range is not inside this.$el
291-
let container = range.commonAncestorContainer;
292-
while (container) {
293-
if (container === this.$el) break;
294-
container = container.parentElement;
295-
if (!container) return;
296-
}
297-
}
298-
299289
if (range) {
290+
if (keep) {
291+
// exit the function if the range is not inside this.$el
292+
let container = range.commonAncestorContainer;
293+
while (container) {
294+
if (container === this.$el) break;
295+
container = container.parentElement;
296+
if (!container) return;
297+
}
298+
}
299+
300300
const { atItems, avoidEmail, allowSpaces, showUnique } = this
301301
302302
let show = true

0 commit comments

Comments
 (0)