Skip to content

Commit 1711525

Browse files
fix(statevis): Fix null dereference in ref callback
1 parent 3814e8f commit 1711525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/statevis/StateVisualizer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class StateVisualizer extends Component<IProps, IState> {
157157
onMouseDown={this.cancelAutoMinimize.bind(this)}
158158
onMouseEnter={this.cancelAutoMinimize.bind(this)}>
159159
<StateVisWindow minimized={this.state.minimized}
160-
ref={(windowRef) => this.windowEl = windowRef.el}
160+
ref={(windowRef) => this.windowEl = windowRef && windowRef.el || this.windowEl}
161161
onResize={({ width, height }) => this.setState({ width, height })}>
162162

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

0 commit comments

Comments
 (0)