Skip to content

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

Make codeclimate happy

dominik-zeglenbd6dcc6de5f9
diff --git a/saleor/static/dashboard/js/components/product-filter.js b/saleor/static/dashboard/js/components/product-filter.js
index 6d94e11ff8..f4900feaf1 100644
--- a/saleor/static/dashboard/js/components/product-filter.js
+++ b/saleor/static/dashboard/js/components/product-filter.js
@@ -1,15 +1,15 @@
-import {screenSizes} from "./misc";
+import {screenSizes} from './misc';
let prevWindowWidth = null;
let initialized = false;
const moveFilters = () => {
- if(prevWindowWidth !== window.innerWidth) {
+ if (prevWindowWidth !== window.innerWidth) {
const $collapsibleCard = $('.collapse');
prevWindowWidth = window.innerWidth;
- if(window.innerWidth < screenSizes.md) {
+ if (window.innerWidth < screenSizes.md) {
$('#product-list').before($('#product-filters'));
- if(!initialized) {
+ if (!initialized) {
$collapsibleCard.addClass('collapsed');
initialized = true;
}
@@ -21,17 +21,17 @@ const moveFilters = () => {
};
export default $(document).ready(() => {
- if($('.body-products-list').length) {
+ if ($('.body-products-list').length) {
moveFilters();
$(window).on('resize', moveFilters);
}
$('.collapse-activate').on('click', (e) => {
const $collapsibleCard = $('.collapse');
- if($collapsibleCard.hasClass('collapsed')) {
+ if ($collapsibleCard.hasClass('collapsed')) {
$collapsibleCard.removeClass('collapsed');
} else {
$collapsibleCard.addClass('collapsed');
}
- })
+ });
});