Skip to content

Commit

Permalink
[Snackbar] Assert that displayed data changed before hide/show
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 31, 2015
1 parent 0d86eea commit bfa7336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/snackbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Snackbar = React.createClass({
let newMuiTheme = nextContext.muiTheme ? nextContext.muiTheme : this.state.muiTheme;
this.setState({muiTheme: newMuiTheme});

if (this.state.open) {
if (this.state.open && (nextProps.message !== this.props.message || nextProps.action !== this.props.action)) {
this.setState({
open: false,
});
Expand Down

0 comments on commit bfa7336

Please sign in to comment.