Skip to content
Snippets Groups Projects
Commit 86539d9f authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

omit email if not entered

parent 8e2f097a
No related branches found
No related tags found
1 merge request!78Resolve "Rewrite registration wizard"
Pipeline #195970 canceled
......@@ -736,7 +736,7 @@ import SecondaryActionButton from "aleksis.core/components/generic/buttons/Secon
dataForSubmit() {
const { confirmEmail, confirmPassword, ...filteredUserData } = this.data.user;
const data = {
let data = {
...this.data,
additionalFields: JSON.stringify(this.data.additionalFields),
terms: JSON.stringify(this.data.terms),
......@@ -745,7 +745,11 @@ import SecondaryActionButton from "aleksis.core/components/generic/buttons/Secon
if (this.event.cost == 0 && this.event.maxCost == 0) {
const { payment, ...filteredData } = data;
return filteredData;
data = filteredData;
}
if (!this.data.email.localPart && !this.data.email.domain) {
const { email, ...filteredData } = data;
data = filteredData;
}
return data;
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment