Kaynağa Gözat

minor null casing on refreshOptions

sunguroku 5 yıl önce
ebeveyn
işleme
8c4e638a34
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      dashboard/src/components/Selector.tsx

+ 3 - 1
dashboard/src/components/Selector.tsx

@@ -132,7 +132,9 @@ export default class Selector extends Component<PropsType, StateType> {
         <MainSelector
           ref={this.parentRef}
           onClick={() => {
-            this.props.refreshOptions();
+            if (this.props.refreshOptions) {
+              this.props.refreshOptions();
+            }
             this.setState({ expanded: !this.state.expanded });
           }}
           expanded={this.state.expanded}