Fix tests
This commit is contained in:
@@ -16,7 +16,9 @@ class CoMarketNavContainer extends Component {
|
||||
|
||||
handleSearchChange(event) {
|
||||
this.setState({searchValue: event.target.value});
|
||||
this.props.dispatch(fetchShopPackages(this.props.selectedCommercialLead, event.target.value));
|
||||
if (this.props.selectedCommercialLead) {
|
||||
this.props.dispatch(fetchShopPackages(this.props.selectedCommercialLead, event.target.value));
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -8,7 +8,9 @@ import {fetchShopPackages} from '../../actions/coMarket/coMarketPackagesActions'
|
||||
|
||||
class CoMarketPackagesContainer extends Component {
|
||||
componentDidMount() {
|
||||
this.props.dispatch(fetchShopPackages(this.props.selectedCommercialLead));
|
||||
if (this.props.selectedCommercialLead) {
|
||||
this.props.dispatch(fetchShopPackages(this.props.selectedCommercialLead));
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -43,7 +43,9 @@ class CoMarketCatalogSelect extends Component {
|
||||
|
||||
handleSearchChange(event) {
|
||||
this.setState({searchValue: event.target.value});
|
||||
this.props.dispatch(fetchShopPackages(this.props.selectedCommercialLead, event.target.value));
|
||||
if (this.props.selectedCommercialLead) {
|
||||
this.props.dispatch(fetchShopPackages(this.props.selectedCommercialLead, event.target.value));
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user