-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Should vuex mapState print error message #1093 #1162 #1297
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
EdyHartono
commented
Jun 3, 2018
- return an empty array when map is not valid
- log an error message when map is not valid
@ktsn i don't know if i should directly throw an error in non production mode or just log the error, any suggestion ? |
I think it would be nice if it threw an error. As far as I can see, if a developer is not providing the proper values, he is making a mistake, and it would be a bigger help to actually have this exception being thrown, because it would be more noticeable. Another small suggestion for this phrasing: It might sound better with "either" sounds a bit strange together with the "slash" phrasing. ... just my two cents :-) Thanks for doing awesome work. |
This PR would have saved me an hour today if it were merged. Is there any reason why it hasn't been merged? It's a fairly small and simple PR and it provides Vuex users with much better feedback than is currently provided when you make a mistake with |
Also wondering why this wasn't merged. |
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.
LGTM. Thank you!
Hey @EdyHartono, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚 |