Skip to content

Commit c047226

Browse files
jrcastro2slint
authored andcommitted
ErrorMessage: add icon attribute only when needed
* closes zenodo/rdm-project#482
1 parent 8cde6ba commit c047226

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/elements/ErrorMessage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class ErrorMessage extends Component {
4949
const { header, errors, content, icon, ...uiProps } = this.props;
5050

5151
return (
52-
<Message icon {...uiProps}>
52+
<Message icon={Boolean(icon)} {...uiProps}>
5353
{icon && <Icon name={icon} />}
5454
<Message.Content role="alert">
5555
{header && <Message.Header>{header}</Message.Header>}

0 commit comments

Comments
 (0)