Web: Common: PageLayout: Fixed error "Cannot read properties of null (reading 'focus')".

This commit is contained in:
Tatiana Lopaeva 2021-10-21 13:19:28 +03:00
parent ac0e803072
commit fce60f4018

View File

@ -106,8 +106,9 @@ class SectionBody extends React.Component {
// }
componentDidMount() {
const { withScroll } = this.props;
if (!this.props.autoFocus) return;
this.focusRef.current.focus();
if (withScroll) this.focusRef.current.focus();
}
componentWillUnmount() {