on master help sign in
Merge pull request #399 from mgold/char-compare

Fix Char comparisons

commit39769b77afd719e785643220bdda8fe8a8f5fa33 authorEvan Czaplicki <info@elm-lang.org> dateThu 19 Dec 2013, 18:53 (13 years ago) parent3686c82460fe0d
1 file changed+3−1
libraries/Native/Utils.js+3−1
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 instanceof String){
29+ return x === y ? EQ : x < y ? LT : GT;
30+ }
2931
3032 if (x.ctor === "::" || x.ctor === "[]") {
3133 while (true) {