fix: resolve issue with button variant detection#607
fix: resolve issue with button variant detection#607shon-button wants to merge 1 commit intodevelopfrom
Conversation
📝 Problem: The previous code did not handle the case where 'args.variant' was undefined, leading to a 'Cannot read properties of undefined' error. 🛠️ Solution: Added a check to ensure 'args.variant' is defined before using it in the conditional logic. If 'args.variant' is undefined, it defaults to an empty string, preventing the error and allowing proper detection of the variant. 🚀 Impact: This fix ensures that the button variant detection works correctly, providing a smoother user experience and preventing potential errors.
|
CommitLint is pretty strict on this repo, from what I remember. It only allows single-line commits, doesn't like the emojis (which I personally love having in messages, so yay to you!), and the "subject required" needs the PR title to be formatted with lowercase: If we ever swing back into working regularly in this repo, likely something worth discussing. |
joshgamache
left a comment
There was a problem hiding this comment.
Simple and effective fix, nice work! 🌮
Hi Josh, appreciate the insight to the issues! |
📝 Problem: #584
The previous code did not handle the case where 'args.variant' was undefined, leading to a 'Cannot read properties of undefined' error.
🛠️ Solution:
Added a check to ensure 'args.variant' is defined before using it in the conditional logic. If 'args.variant' is undefined, it defaults to an empty string, preventing the error and allowing proper detection of the variant.
🚀 Impact:
This fix ensures that the button variant detection works correctly, providing a smoother user experience and preventing potential errors.