-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
bugfix-colorpicker(Added a color picker for tiles) #1787
base: master
Are you sure you want to change the base?
Conversation
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.
codacy is wrong this code looks fine
can someone please merge this PR after reviewing |
}; | ||
|
||
handleChangeComplete = color => { | ||
const colorhex = color.hex ? color.hex : ''; |
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.
Is this safe?
We check whether color
is truthy on line 414; I assume it's possible for it to be undefined so we could get a TypeError here. Perhaps we could move this inside the if statement or use optional chaining?
const colorhex = color.hex ? color.hex : ''; | |
const colorhex = color?.hex || ''; |
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.
Sure , will make this change
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.
I have made the changes @sylvansson
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.
Thank you 🙏 I'll let one of the core maintainers review your changes :-)
@martinbedouret @RodriSanchez1 @tomivm
Hi , I have solved the issue please do review and ping me up for any further issues , thanks !