fix: Handle sanitizeUrl can receive non-string value

closes #3746
This commit is contained in:
Tom Moor
2022-07-08 21:15:07 +02:00
parent 97f8c0813c
commit 32b7a7df00
2 changed files with 6 additions and 2 deletions

View File

@@ -113,7 +113,7 @@ class LinkEditor extends React.Component<Props, State> {
this.discardInputValue = true;
const { from, to } = this.props;
href = sanitizeHref(href);
href = sanitizeHref(href) ?? "";
this.props.onSelectLink({ href, title, from, to });
};