@@ -345,9 +345,11 @@ Elm.Native.Array.make = function(elm) {
345345 // TODO: Add support for appending trees of different sizes. Current
346346 // behavior will just rise the lower tree and then append them.
347347 function append(a,b) {
348− if (b.height > a.height) { return append(parentise(a, b.height), b); }
349− if (a.height > b.height) { return append(a, parentise(b, a.height)); }
350− if (a.height == 0) { return append(parentise(a, 1), parentise(b, 1)); }
348+ if (a.table.length == 0) return b;
349+ if (b.table.length == 0) return a;
350+ if (b.height > a.height) return append(parentise(a, b.height), b);
351+ if (a.height > b.height) return append(a, parentise(b, a.height));
352+ if (a.height == 0) return append(parentise(a, 1), parentise(b, 1));
351353
352354 var c = append_(a, b);
353355 if (c[1].table.length > 0) {