* Fix title from draft being dismissed Add a way to bypass the title generation query when the url change is from local storage (draft) and not user interaction. * Check draft title from storage * Remove unused
This commit is contained in:
parent
4b77e7a1a9
commit
a7105b90f2
|
@ -172,7 +172,9 @@ export function LinkForm ({ item, sub, editThreshold, children }) {
|
|||
? <div className='text-muted fw-bold'><Countdown date={editThreshold} /></div>
|
||||
: 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 }
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue