on master help sign in
fix show for numbers and other non-object types
a6c96ebEvan Czaplicki
libraries/Native/Show.js+1−1
@@ -21,7 +21,7 @@ Elm.Native.Show.make = function(elm) {
21 return v ? "True" : "False";
21 return v ? "True" : "False";
22 } else if (type === "number") {
22 } else if (type === "number") {
23 return v+"";
23 return v+"";
24− } else if (v.isChar && v instanceof String) {
24+ } else if ((v instanceof String) && v.isChar) {
25 return "'" + addSlashes(v) + "'";
25 return "'" + addSlashes(v) + "'";
26 } else if (type === "string") {
26 } else if (type === "string") {
27 return '"' + addSlashes(v) + '"';
27 return '"' + addSlashes(v) + '"';