react-redux-alerts
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -77,6 +77,4 @@ 'use strict'; | ||
function mapStateToProps(state) { | ||
var alert = state[alertName]; | ||
var visbility = alert ? alert.isVisible : false; | ||
var message = alert ? alert.message : ''; | ||
return { isVisible: visbility, message: message }; | ||
return { isVisible: state.alerts ? state.alerts[alertName] : false }; | ||
}; | ||
@@ -83,0 +81,0 @@ |
{ | ||
"name": "react-redux-alerts", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "A lightweight library for creating keyed alerts in a Redux app", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -30,6 +30,4 @@ import React, { Component } from 'react'; | ||
function mapStateToProps (state) { | ||
const alert = state[alertName]; | ||
const visbility = alert ? alert.isVisible : false; | ||
const message = alert ? alert.message : ''; | ||
return { isVisible: visbility, message}; | ||
return { isVisible: state.alerts ? state.alerts[alertName] : false }; | ||
}; | ||
@@ -36,0 +34,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22270
421