fix(draft-order): email reset when changing customer (#13771)
This commit is contained in:
5
.changeset/new-cameras-roll.md
Normal file
5
.changeset/new-cameras-roll.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/draft-order": patch
|
||||
---
|
||||
|
||||
fix(draft-order): email reset when changing customer
|
||||
@@ -322,12 +322,10 @@ const CustomerField = ({ control, setValue }: CustomerFieldProps) => {
|
||||
|
||||
const customerEmail = label?.match(/\((.*@.*)\)$/)?.[1] || label
|
||||
|
||||
if (!email && customerEmail) {
|
||||
setValue("email", customerEmail, {
|
||||
setValue("email", customerEmail || "", {
|
||||
shouldDirty: true,
|
||||
shouldTouch: true,
|
||||
})
|
||||
}
|
||||
},
|
||||
[email, setValue, customers.options]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user