fix show for numbers and other non-object types
commita6c96ebf6bf7d8ac2504d2db8c23a5c99f5140a6
authorEvan Czaplicki <info@elm-lang.org>
dateThu 24 Oct 2013, 15:02 (13 years ago)
parente6f8307
libraries/Native/Show.js+1−1
@@ -21,7 +21,7 @@ Elm.Native.Show.make = function(elm) {
2121 return v ? "True" : "False";
2222 } else if (type === "number") {
2323 return v+"";
24− } else if (v.isChar && v instanceof String) {
24+ } else if ((v instanceof String) && v.isChar) {
2525 return "'" + addSlashes(v) + "'";
2626 } else if (type === "string") {
2727 return '"' + addSlashes(v) + '"';