Browse Source

Simplified asGen.

Eugene Lazutkin 7 năm trước cách đây
mục cha
commit
4b43a2eedb
1 tập tin đã thay đổi với 1 bổ sung3 xóa
  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);