Skip to content
Snippets Groups Projects
Commit 55659db5 authored by Cam Saül's avatar Cam Saül
Browse files

Make sure icon.attrs is defined before trying to get icon.attrs.className

parent 28bf5aa5
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,7 @@ export default class Icon extends Component {
if (!icon) {
return null;
}
const className = cx(icon.attrs.className, this.props.className)
const className = cx(icon.attrs && icon.attrs.className, this.props.className)
const props = { ...icon.attrs, ...this.props, className };
for (const prop of ["width", "height", "size", "scale"]) {
if (typeof props[prop] === "string") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment