Explorar o código

Swapped the empty filter.

Eugene Lazutkin %!s(int64=3) %!d(string=hai) anos
pai
achega
cb924fb0f3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/index.js

+ 1 - 1
src/index.js

@@ -101,7 +101,7 @@ const chain = (fns, options) => {
     throw TypeError("Chain's first argument should be a non-empty array.");
     throw TypeError("Chain's first argument should be a non-empty array.");
   }
   }
 
 
-  fns = fns.filter(fn => fn).flat(Infinity);
+  fns = fns.flat(Infinity).filter(fn => fn);
 
 
   const streams = (
   const streams = (
       options && options.noGrouping
       options && options.noGrouping