Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix svg block icons #7140
The condition to check SVG icons was not correct. Now we use a different condition: if icon is defined, but the source is not defined we assume the icon should be the source. This avoids the need to check for all the possible icon sources e.g: string, function and React element.
How has this been tested?
Go to existing blocks and change the icon to the following possibilities, verify in all the cases the result is the expected:
changed the title from
Fix svg blocks svg icons
Fix svg block svg icons
Jun 5, 2018
Hi @youknowriad thank you for the review, it was not your fault I did a simple test passing a MyTestIcon component but totally missed the possibility of inline JSX while registering the icon. Test cases were added to the registration.
Hi @mcsf I added a function that validates if we have a valid icon.