@@ -357,9 +357,11 @@ Elm.Native.Array.make = function(elm) {
357357 // TODO: Add support for appending trees of different sizes. Current
358358 // behavior will just rise the lower tree and then append them.
359359 function append(a,b) {
360− if (b.height > a.height) { return append(parentise(a, b.height), b); }
361− if (a.height > b.height) { return append(a, parentise(b, a.height)); }
362− if (a.height == 0) { return append(parentise(a, 1), parentise(b, 1)); }
360+ if (a.table.length == 0) return b;
361+ if (b.table.length == 0) return a;
362+ if (b.height > a.height) return append(parentise(a, b.height), b);
363+ if (a.height > b.height) return append(a, parentise(b, a.height));
364+ if (a.height == 0) return append(parentise(a, 1), parentise(b, 1));
363365
364366 var c = append_(a, b);
365367 if (c[1].table.length > 0) {