react-redux-toastr
Advanced tools
Comparing version 7.4.4 to 7.4.5
@@ -162,4 +162,5 @@ 'use strict'; | ||
this.props.addToMemory(item.id); | ||
// | ||
this.closeButton.focus(); | ||
if (this.closeButton !== undefined) { | ||
this.closeButton.focus(); | ||
} | ||
}; | ||
@@ -174,3 +175,5 @@ | ||
setTimeout(function () { | ||
document.getElementsByClassName('toastr-control')[0].focus(); | ||
if (document.getElementsByClassName('toastr-control').length > 0) { | ||
document.getElementsByClassName('toastr-control')[0].focus(); | ||
} | ||
}, 50); | ||
@@ -177,0 +180,0 @@ }; |
@@ -75,3 +75,5 @@ 'use strict'; | ||
// when toast loads the toast close button automatically focuses on the toast control | ||
this.closeButton.focus(); | ||
if (this.closeButton !== undefined) { | ||
this.closeButton.focus(); | ||
} | ||
}; | ||
@@ -83,3 +85,5 @@ | ||
setTimeout(function () { | ||
document.getElementsByClassName('toastr-control')[0].focus(); | ||
if (document.getElementsByClassName('toastr-control').length > 0) { | ||
document.getElementsByClassName('toastr-control')[0].focus(); | ||
} | ||
}, 50); | ||
@@ -86,0 +90,0 @@ }; |
{ | ||
"name": "react-redux-toastr", | ||
"version": "7.4.4", | ||
"version": "7.4.5", | ||
"description": "react-redux-toastr is a React toastr message implemented with Redux", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
135476
2327