Skip to content

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

Fix checking if array contains a string

Marcin Gębala0df099808c09
diff --git a/saleor/static/js/components/categoryPage/utils.js b/saleor/static/js/components/categoryPage/utils.js
index 157549ef80..6a7883d5d2 100644
--- a/saleor/static/js/components/categoryPage/utils.js
+++ b/saleor/static/js/components/categoryPage/utils.js
@@ -31,5 +31,5 @@ export const ensureAllowedName = (name, allowed) => {
if (name && name[0] === '-') {
name = name.substr(1, name.length);
}
- return name in allowed ? origName : null;
+ return allowed.indexOf(name) > -1 ? origName : null;
};