saveDraft-fix

This commit is contained in:
Untone 2024-05-03 01:39:28 +03:00
parent a89a9bb1f4
commit bd0fdeeb1f

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('[EditView.autoSave] shout has topic')
setSaving(true) setSaving(true)
if (props.shout?.published_at) { if (props.shout?.published_at) {
saveDraftToLocalStorage(form) saveDraftToLocalStorage(form)