Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove null from conditions

Krzysztof Białogłowicz132bc3656d38
diff --git a/saleor/static/js/components/categoryPage/CategoryPage.js b/saleor/static/js/components/categoryPage/CategoryPage.js
index 0738b98ca5..ff3656a330 100644
--- a/saleor/static/js/components/categoryPage/CategoryPage.js
+++ b/saleor/static/js/components/categoryPage/CategoryPage.js
@@ -132,9 +132,9 @@ class CategoryPage extends Component {
<div className="row">
<div className="col-6 col-md-2 col-lg-6 filters-menu">
<span className="filters-menu-label hidden-sm-up" onClick={() => this.toggleMenu(filtersMenu)}>Filters</span>
- {variables.attributesFilter.length || variables.minPrice || variables.maxPrice ? (
+ {(variables.attributesFilter.length || variables.minPrice || variables.maxPrice) && (
<span className="filters-menu-icon hidden-sm-up"></span>
- ) : (null)}
+ )}
</div>
<div className="col-6 col-md-10 col-lg-6">
<SortBy sortedValue={variables.sortBy} setSorting={this.setSorting} />
@@ -148,7 +148,7 @@ class CategoryPage extends Component {
<div className="product-filters">
<CategoryFilter category={category} />
</div>
- {filtersMenu ? (
+ {filtersMenu && (
<div>
<h2>
{gettext('Filters')}
@@ -167,7 +167,7 @@ class CategoryPage extends Component {
/>
</div>
</div>
- ) : (null)}
+ )}
</div>
<div className="col-md-8 col-lg-9 category-list">
<div>
diff --git a/saleor/static/js/components/categoryPage/PriceFilter.js b/saleor/static/js/components/categoryPage/PriceFilter.js
index e0c3482b5a..7a1f5f68a5 100644
--- a/saleor/static/js/components/categoryPage/PriceFilter.js
+++ b/saleor/static/js/components/categoryPage/PriceFilter.js
@@ -48,7 +48,7 @@ export default class PriceFilter extends Component {
title={gettext('Price range')}
visibility={visibility}
/>
- {visibility || minPrice || maxPrice ? (
+ {(visibility || minPrice || maxPrice) && (
<div>
<input
className="form-control"
@@ -71,7 +71,7 @@ export default class PriceFilter extends Component {
/>
<button className="btn btn-primary" onClick={this.updateFilter}>{gettext('Update')}</button>
</div>
- ) : (null)}
+ )}
</div>
);
}