on master help sign in
Fix Array.append with small arrays
9829883Christian Widera
libraries/Native/Array.js+5−3
@@ -390,9 +390,11 @@ Elm.Native.Array.make = function(elm) {
390 return c[0];
390 return c[0];
391 }
391 }
392
392
393+ if (c[0].height > 0) {
393− var toRemove = calcToRemove(a, b);
394+ var toRemove = calcToRemove(a, b);
394− if (toRemove > E) {
395+ if (toRemove > E) {
395− c = shuffle(c[0], c[1], toRemove);
396+ c = shuffle(c[0], c[1], toRemove);
397+ }
396 }
398 }
397
399
398 return siblise(c[0], c[1]);
400 return siblise(c[0], c[1]);