Clean up toast logic in App.jsx

pull/5960/head
Berkeley Martinez 2016-01-09 22:48:48 -08:00
parent 632f596821
commit f65b6472dd
1 changed files with 2 additions and 7 deletions

View File

@ -46,14 +46,9 @@ export default contain(
toast: PropTypes.object
},
componentWillReceiveProps({ toast: nextToast }) {
componentWillReceiveProps({ toast: nextToast = {} }) {
const { toast = {} } = this.props;
if (
toast &&
nextToast &&
toast.id !== nextToast.id
) {
if (toast.id !== nextToast.id) {
this.refs.toaster[nextToast.type || 'success'](
nextToast.message,
nextToast.title,