Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Replace 'startsWith' function
Marcin Gębalabe1bb3ddcc87
diff --git a/saleor/static/js/components/categoryPage/utils.js b/saleor/static/js/components/categoryPage/utils.jsindex 9055bc00c1..157549ef80 100644--- a/saleor/static/js/components/categoryPage/utils.js+++ b/saleor/static/js/components/categoryPage/utils.js@@ -28,7 +28,7 @@ export const getAttributesFromQuery = (exclude) => {export const ensureAllowedName = (name, allowed) => {let origName = name;- if (name.startsWith('-')) {+ if (name && name[0] === '-') {name = name.substr(1, name.length);}return name in allowed ? origName : null;