Browse Source

Swapped the empty filter.

Eugene Lazutkin 3 năm trước cách đây
mục cha
commit
cb924fb0f3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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.");
   }
 
-  fns = fns.filter(fn => fn).flat(Infinity);
+  fns = fns.flat(Infinity).filter(fn => fn);
 
   const streams = (
       options && options.noGrouping