diff --git a/array-datasource.js b/array-datasource.js index a326521..6b17c78 100644 --- a/array-datasource.js +++ b/array-datasource.js @@ -19,13 +19,7 @@ function ArrayDataSource(arr) { } function _compare(a, b) { - if (a < b) { - return -1; - } - if (a > b) { - return 1; - } - return 0; + return (a===undefined)-(b===undefined) || (a==='')-(b==='') || (a===null)-(b===null) || +(a>b)||-(a