diff --git a/src/SelectOptionGroup/index.js b/src/SelectOptionGroup/index.js index 97c70046..ffba81ca 100644 --- a/src/SelectOptionGroup/index.js +++ b/src/SelectOptionGroup/index.js @@ -38,6 +38,7 @@ class SelectOptionGroup extends Component { } resetMenuStyle = () => { + if (!this.optionGroupRef) return; const { isInModal, position } = this.props; const { top, height } = this.optionGroupRef.getBoundingClientRect(); if (isInModal) {