diff --git a/client/edit-profile.js b/client/edit-profile.js index c066f35..a4e0b95 100644 --- a/client/edit-profile.js +++ b/client/edit-profile.js @@ -12,8 +12,7 @@ setTimeout(() => { $('#wf-form-Editing-Profile').submit(function (event) { event.preventDefault() - let data = objectifyForm($(this).serializeArray()) - data = data.filter(i => i.value) + let data = objectifyForm($(this).serializeArray().filter(i => i.value)) console.log(data) updateUser(data) }) diff --git a/client/edit-project.js b/client/edit-project.js index ee4e550..94069fe 100644 --- a/client/edit-project.js +++ b/client/edit-project.js @@ -148,14 +148,14 @@ $('#wf-form-Submit-Project').submit(function (event) { let selectedTags = $('.multiple-select').serializeArray().map(item => item.value) data.tags = [...new Set(selectedTags)] - + console.log(data) createProject(data) }) $('#wf-form-Edit-Project').submit(function (event) { event.preventDefault() - let data = objectifyForm($(this).serializeArray()) + let data = objectifyForm($(this).serializeArray().filter(i => i.value)) data.details = tinymce.get()[0].getContent() diff --git a/client/edit-workflow.js b/client/edit-workflow.js index d2d1c57..8744762 100644 --- a/client/edit-workflow.js +++ b/client/edit-workflow.js @@ -156,7 +156,7 @@ $('#wf-form-Submit-Workflow').submit(function (event) { $('#wf-form-Edit-Workflow').submit(function (event) { event.preventDefault() - let data = objectifyForm($(this).serializeArray()) + let data = objectifyForm($(this).serializeArray().filter(i => i.value)) data.details = tinymce.get()[0].getContent()