Skip to content

Commit

Permalink
fix(statevis): Fix null dereference in ref callback
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Jan 3, 2018
1 parent 3814e8f commit 1711525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/statevis/StateVisualizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class StateVisualizer extends Component<IProps, IState> {
onMouseDown={this.cancelAutoMinimize.bind(this)}
onMouseEnter={this.cancelAutoMinimize.bind(this)}>
<StateVisWindow minimized={this.state.minimized}
ref={(windowRef) => this.windowEl = windowRef.el}
ref={(windowRef) => this.windowEl = windowRef && windowRef.el || this.windowEl}
onResize={({ width, height }) => this.setState({ width, height })}>

<div onClick={() => this.setState({ minimized: false })}
Expand Down

0 comments on commit 1711525

Please sign in to comment.