1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Add defaultProps to MultipleNotifications (#7449)

This commit is contained in:
Whymarrh Whitby 2019-11-16 19:43:46 -03:30 committed by GitHub
parent d41522d5c0
commit 7a6f2693fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,11 @@ import classnames from 'classnames'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
export default class MultipleNotifications extends PureComponent { export default class MultipleNotifications extends PureComponent {
static defaultProps = {
children: [],
classNames: [],
}
static propTypes = { static propTypes = {
children: PropTypes.array, children: PropTypes.array,
classNames: PropTypes.array, classNames: PropTypes.array,
@ -14,7 +19,7 @@ export default class MultipleNotifications extends PureComponent {
render () { render () {
const { showAll } = this.state const { showAll } = this.state
const { children, classNames = [] } = this.props const { children, classNames } = this.props
const childrenToRender = children.filter(child => child) const childrenToRender = children.filter(child => child)
if (childrenToRender.length === 0) { if (childrenToRender.length === 0) {