For some reason and on specific cases only, I was receiving that t.toLowerCase() is not functioning. I managed to overpass this issue by editing the following:
if((isNaN(parseFloat(a)) || !isFinite(a)) || (isNaN(parseFloat(b)) || !isFinite(b))){
//Isn't a number so lowercase the string to properly compare
if(a.toString().toLowerCase() < b.toString().toLowerCase()) return -1;
if(a.toString().toLowerCase() > b.toString().toLowerCase()) return 1;
}
else{
//Parse strings as numbers to compare properly
if(parseFloat(a) < parseFloat(b)) return -1;
if(parseFloat(a) > parseFloat(b)) return 1;
}
Could you please check that?
Best
George