Fix append on text

string literals have type string, whereas string objects are instances
of String
This commit is contained in:
Evan Czaplicki 2013-10-10 14:25:49 -07:00
parent 2c080b6b0d
commit 4a914a497a

View file

@ -53,10 +53,8 @@ Elm.Native.List.make = function(elm) {
}
function append(xs,ys) {
if (typeof xs === "string") {
if (xs.isText) return Utils.txt(xs.concat(ys));
return xs.concat(ys);
}
if (typeof xs === "string") return xs.concat(ys);
if (xs.ctor === '[]') { return ys; }
var root = Cons(xs._0, Nil);
var curr = root;