diff --git a/components/link-form.js b/components/link-form.js index fa754721..0940da0a 100644 --- a/components/link-form.js +++ b/components/link-form.js @@ -172,7 +172,9 @@ export function LinkForm ({ item, sub, editThreshold, children }) { ?
: null} onChange={async (formik, e) => { - if ((/^ *$/).test(formik?.values.title)) { + const hasTitle = !!(formik?.values.title.trim().length > 0) + const hasDraftTitle = !!(window.localStorage.getItem('link-title')?.trim()?.length > 0) + if (!hasTitle && !hasDraftTitle) { getPageTitleAndUnshorted({ variables: { url: e.target.value } })