fix: aks page init formdata

This commit is contained in:
shuai
2024-07-16 17:40:18 +08:00
parent c42266c2f8
commit 85bdec0009
+1 -2
View File
@@ -147,7 +147,6 @@ const Ask = () => {
const file = fm<any>(decodeURIComponent(prefill));
formData.title.value = file.attributes?.title;
formData.content.value = file.body;
setFormData({ ...formData });
if (!queryTags && file.attributes?.tags) {
updateTags(file.attributes.tags);
}
@@ -158,8 +157,8 @@ const Ask = () => {
formData.answer_content.value = draft.answer_content;
setCheckState(Boolean(draft.answer_content));
setHasDraft(true);
setFormData({ ...formData });
}
setFormData({ ...formData });
} else {
resetForm();
}