Skip to content

Commit

Permalink
Merge pull request mui#2024 from oliviertassinari/snackbar-fix-hide-show
Browse files Browse the repository at this point in the history
[Snackbar] Assert that displayed data changed before hide/show
  • Loading branch information
oliviertassinari committed Nov 3, 2015
2 parents 076c4af + bfa7336 commit 08a7c6b
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 08a7c6b

Please sign in to comment.