From 54219dc8dfed15b1f5563b3ef32a51bdca8f5b01 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Wed, 16 Jun 2021 18:20:38 +0530 Subject: [PATCH] fix-41 - checking for null element --- frontend/app/components/Session_/TimeTable/TimeTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/Session_/TimeTable/TimeTable.js b/frontend/app/components/Session_/TimeTable/TimeTable.js index 7ab37101a..9753e3d44 100644 --- a/frontend/app/components/Session_/TimeTable/TimeTable.js +++ b/frontend/app/components/Session_/TimeTable/TimeTable.js @@ -135,7 +135,7 @@ export default class TimeTable extends React.PureComponent { ...computeTimeLine(this.props.rows, this.state.firstVisibleRowIndex, this.visibleCount), }); } - if (this.props.activeIndex && prevProps.activeIndex !== this.props.activeIndex) { + if (this.props.activeIndex && prevProps.activeIndex !== this.props.activeIndex && this.scroller.current != null) { this.scroller.current.scrollToRow(this.props.activeIndex); } }