diff --git a/src/TimeGrid.js b/src/TimeGrid.js index dd5b46f98..197037a1e 100644 --- a/src/TimeGrid.js +++ b/src/TimeGrid.js @@ -267,7 +267,9 @@ export default class TimeGrid extends Component { } this.measureGutterAnimationFrameRequest = window.requestAnimationFrame( () => { - const width = getWidth(this.gutterRef?.current) + const width = this.gutterRef?.current + ? getWidth(this.gutterRef.current) + : undefined if (width && this.state.gutterWidth !== width) { this.setState({ gutterWidth: width })