Fix flow error

This commit is contained in:
Florian Rival
2019-03-17 22:59:08 +00:00
parent ec6f8d04ed
commit 0623cb2aaf

View File

@@ -218,7 +218,7 @@ export default class ThemableEventsTree extends Component<EventsTreeProps, *> {
onHeightsChanged(cb: ?() => void) {
this.forceUpdate(() => {
// Help the developer updating react-sortable-tree
if (!this._list.wrappedInstance.recomputeRowHeights) {
if (this._list && !this._list.wrappedInstance.recomputeRowHeights) {
console.error(
'recomputeRowHeights not on wrappedInstance, this must be fixed after updating react-virtualized/react-sortable-tree'
);
@@ -236,7 +236,7 @@ export default class ThemableEventsTree extends Component<EventsTreeProps, *> {
forceEventsUpdate(cb: ?() => void) {
this.setState(this._eventsToTreeData(this.props.events), () => {
// Help the developer updating react-sortable-tree
if (!this._list.wrappedInstance.recomputeRowHeights) {
if (this._list && !this._list.wrappedInstance.recomputeRowHeights) {
console.error(
'recomputeRowHeights not on wrappedInstance, this must be fixed after updating react-virtualized/react-sortable-tree'
);