Fix Char comparisons
Fixes evancz/Elm#392
commitfac00f66c40ca82cb65021a080d29bdb24b1ffe9
authorMax Goldstein <maxgoldstein1@gmail.com>
dateWed 18 Dec 2013, 21:38 (13 years ago)
parent32e7d1d
libraries/Native/Utils.js+3−1
@@ -25,7 +25,9 @@ Elm.Native.Utils.make = function(elm) {
2525 function compare(x,y) { return { ctor: ord[cmp(x,y)+1] } }
2626 function cmp(x,y) {
2727 var ord;
28− if (typeof x !== 'object') return x === y ? EQ : x < y ? LT : GT;
28+ if (typeof x !== 'object' || x.constructor === String){
29+ return x === y ? EQ : x < y ? LT : GT;
30+ }
2931
3032 if (x.ctor === "::" || x.ctor === "[]") {
3133 while (true) {