saving-draft-fix

This commit is contained in:
Untone 2024-05-03 01:40:33 +03:00
parent e6ff073e29
commit b7939dead0

View File

@ -187,7 +187,8 @@ export const EditView = (props: Props) => {
const autoSave = async () => { const autoSave = async () => {
const hasChanges = !deepEqual(form, prevForm) const hasChanges = !deepEqual(form, prevForm)
const hasTopic = Boolean(form.mainTopic) const hasTopic = Boolean(form.mainTopic)
if (hasChanges && hasTopic) { if (hasChanges || hasTopic) {
console.debug("saving draft")
setSaving(true) setSaving(true)
if (props.shout?.published_at) { if (props.shout?.published_at) {
saveDraftToLocalStorage(form) saveDraftToLocalStorage(form)