mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
fix: Spurious link appears when typing enter at the end of a list with a mention (#11238)
This commit is contained in:
@@ -267,7 +267,12 @@ export default class Link extends Mark {
|
||||
return false;
|
||||
}
|
||||
|
||||
const textContent = selection.$from.parent.textContent;
|
||||
let textContent = "";
|
||||
selection.$from.parent.forEach((node) => {
|
||||
if (node.isText && node.text) {
|
||||
textContent += node.text;
|
||||
}
|
||||
});
|
||||
const words = textContent.split(/\s+/);
|
||||
if (!words.length) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user