Skip to content

Commit

Permalink
Don't use select prop for the undefined previous state
Browse files Browse the repository at this point in the history
Fixes #27, #28
  • Loading branch information
gaearon committed Feb 3, 2016
1 parent e8924b1 commit 3af3102
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/LogMonitorEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ export default class LogMonitorEntry extends Component {
theme={this.props.theme}
keyName={'state'}
data={this.props.select(state)}
previousData={this.props.select(this.props.previousState)}
previousData={
typeof this.props.previousState !== 'undefined' ?
this.props.select(this.props.previousState) :
undefined
}
expandRoot={this.props.expandStateRoot}
style={styles.tree} />
);
Expand Down

0 comments on commit 3af3102

Please sign in to comment.