chore: fix link editor always setting empty links in super [skip e2e]

This commit is contained in:
Aman Harwara
2023-08-10 22:21:50 +05:30
parent fd26966a03
commit b9e6f66f42

View File

@@ -23,7 +23,7 @@ const LinkEditor = ({ linkUrl, isEditMode, setEditMode, editor, lastSelection, i
const handleLinkSubmission = () => {
if (lastSelection !== null) {
if (linkUrl !== '') {
if (editedLinkUrl !== '') {
editor.dispatchCommand(TOGGLE_LINK_COMMAND, sanitizeUrl(editedLinkUrl))
}
setEditMode(false)