Parcourir la source

Simplified asGen.

Eugene Lazutkin il y a 7 ans
Parent
commit
4b43a2eedb
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  1. 1 3
      utils/asGen.js

+ 1 - 3
utils/asGen.js

@@ -17,9 +17,7 @@ const next = async function*(value, fns, index) {
     if (isMany(value)) {
       const values = getManyValues(value);
       if (i == fns.length) {
-        for (let j = 0; j < values.length; ++j) {
-          yield values[j];
-        }
+        yield* values;
       } else {
         for (let j = 0; j < values.length; ++j) {
           yield* next(values[j], fns, i);