Check for product categories before loading value (https://github.com/woocommerce/woocommerce-admin/pull/1164)
* Check for product categories before loading value * Filter product category list for undefined values * Remove unnecessary double check of productCategories
This commit is contained in:
parent
f51dba44a0
commit
f88311b372
|
@ -118,7 +118,9 @@ class ProductsReportTable extends Component {
|
|||
products: product_id,
|
||||
} );
|
||||
const categories = this.props.categories;
|
||||
const productCategories = category_ids.map( category_id => categories[ category_id ] );
|
||||
const productCategories = category_ids
|
||||
.map( category_id => categories[ category_id ] )
|
||||
.filter( Boolean );
|
||||
|
||||
return [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue