Fix tests

This commit is contained in:
Almira Krdzic
2018-10-15 05:06:46 +02:00
parent e810dd086a
commit f14d35b1aa
17 changed files with 245 additions and 77 deletions

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {