Merge pull request #399 from mgold/char-compare

Fix Char comparisons
This commit is contained in:
Evan Czaplicki 2013-12-19 18:53:07 -08:00
commit 39769b77af

View file

@ -25,7 +25,9 @@ Elm.Native.Utils.make = function(elm) {
function compare(x,y) { return { ctor: ord[cmp(x,y)+1] } }
function cmp(x,y) {
var ord;
if (typeof x !== 'object') return x === y ? EQ : x < y ? LT : GT;
if (typeof x !== 'object' || x instanceof String){
return x === y ? EQ : x < y ? LT : GT;
}
if (x.ctor === "::" || x.ctor === "[]") {
while (true) {