diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index d623500..66e659b 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -26,7 +26,9 @@ const orderBy = (arr, props, orders) => arr.sort((a, b) => props.reduce((acc, prop, i) => { if (acc === 0) { - const [p1, p2] = orders && orders[i] === 'desc' ? [b[prop], a[prop]] : [a[prop], b[prop]]; + let [p1, p2] = orders && orders[i] === 'desc' ? [b[prop], a[prop]] : [a[prop], b[prop]]; + p1 = typeof p1 === 'string' ? p1.toLowerCase() : p1; + p2 = typeof p2 === 'string' ? p2.toLowerCase() : p2; acc = p1 > p2 ? 1 : p1 < p2 ? -1 : 0; } return acc; diff --git a/js/gamutable.js b/js/gamutable.js index c9c0fee..48ded9a 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -43,6 +43,8 @@ var orderBy = function orderBy(arr, props, orders) { p1 = _ref2[0], p2 = _ref2[1]; + p1 = typeof p1 === 'string' ? p1.toLowerCase() : p1; + p2 = typeof p2 === 'string' ? p2.toLowerCase() : p2; acc = p1 > p2 ? 1 : p1 < p2 ? -1 : 0; }