-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: coupon code invalid error message #1009
fix: coupon code invalid error message #1009
Conversation
e053f14
to
c7ee3b4
Compare
|
||
error.value.applyCoupon = null; | ||
if (errors) { | ||
[error.value.applyCoupon] = errors; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[error.value.applyCoupon] = errors; | |
error.value.applyCoupon = errors; |
Not sure if my suggestion is correct. Can't wrap my head around whether this is detructuring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I want to get the first element. Apply coupon is not an array and I pretty much doubt that there will be more than one error in the same time..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments
- rework coupon code component to handle GraphQL errors M2-559
c7ee3b4
to
e3ab45e
Compare
Description
Related Issue
#957
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: