Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

fix(default-theme): passing the customer entity during register on checkout #1223

Merged
merged 3 commits into from
Nov 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,27 @@ export default {
computed: {
useUserErrorMessages() {
// all the 400 errors are in a raw format stright from the API - to be extracted easily depeding on needs.
return this.userError && this.getMessagesFromErrorsArray(this.userError)
return (
this.userError &&
this.getMessagesFromErrorsArray(this.userError.message)
)
},
customer() {
return {
email: this.email,
password: this.password,
firstName: this.firstName,
lastName: this.lastName,
salutationId: this.salutationId,
storefrontUrl:
window &&
window.location &&
`${window.location.protocol}//${window.location.hostname}`,
billingAddress: Object.assign({}, this.billingAddress, {
firstName: this.firstName,
lastName: this.lastName,
}),
}
},
},
watch: {
Expand Down