Fix error on form creation
This commit is contained in:
parent
50cca61045
commit
e46c13406d
@ -102,9 +102,12 @@
|
|||||||
notifySuccess(`Form ${newTitle} has been created`);
|
notifySuccess(`Form ${newTitle} has been created`);
|
||||||
newTitle = '';
|
newTitle = '';
|
||||||
|
|
||||||
|
let form = res.data;
|
||||||
|
form.inputs = [];
|
||||||
|
|
||||||
activeFormId = null; // Error thrown from {#each forms.find} if we don't temporarily set this to null?
|
activeFormId = null; // Error thrown from {#each forms.find} if we don't temporarily set this to null?
|
||||||
forms = [...forms, res.data];
|
forms = [...forms, form];
|
||||||
activeFormId = res.data.form_id;
|
activeFormId = form.form_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteForm(id) {
|
async function deleteForm(id) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user