Skip to content

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

Refactor code to match ES6 style

dominik-zeglen285ef3185446
diff --git a/saleor/static/dashboard/js/components/search.js b/saleor/static/dashboard/js/components/search.js
index c614f820e4..e4e898bcfc 100644
--- a/saleor/static/dashboard/js/components/search.js
+++ b/saleor/static/dashboard/js/components/search.js
@@ -16,12 +16,8 @@ function closeSearchBar (e) {
$target.toggleClass('active', !isExpanded);
}
-const init = $(() => {
- $('#btn-search').on('click', openSearchBar);
- $('#btn-search-close').on('click', closeSearchBar);
- $('#btn-search-submit').on('click', submit);
-});
+// -----
-export {
- init as default
-};
+$('#btn-search').on('click', openSearchBar);
+$('#btn-search-close').on('click', closeSearchBar);
+$('#btn-search-submit').on('click', submit);