react-redux-alerts
Advanced tools
Comparing version 1.3.5 to 1.3.6
@@ -66,3 +66,3 @@ 'use strict'; | ||
var mapStateToProps = function mapStateToProps(state) { | ||
isVisible: state.alerts[alertName]; | ||
isVisible: state.alerts ? state.alerts[alertName] : false; | ||
}; | ||
@@ -69,0 +69,0 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) { |
{ | ||
"name": "react-redux-alerts", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "A lightweight library for creating keyed alerts in a Redux app", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -25,3 +25,3 @@ import React, { Component } from 'react'; | ||
const mapStateToProps = state => { isVisible: state.alerts[alertName] }; | ||
const mapStateToProps = state => { isVisible: state.alerts ? state.alerts[alertName] : false }; | ||
const mapDispatchToProps = dispatch => { actions: bindActionCreators(alertActions, dispatch) }; | ||
@@ -28,0 +28,0 @@ return connect(mapStateToProps, mapDispatchToProps)(AlertContainer); |
17878