We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5709132 commit 8916c20Copy full SHA for 8916c20
src/map/group.js
@@ -28,9 +28,7 @@ export function* group ( key , iterable ) {
28
let currval = first.value ;
29
let currkey = key( currval ) ;
30
31
- let tgtkey ;
32
-
33
- const grouper = function* ( ) {
+ const grouper = function* ( tgtkey ) {
34
35
while ( true ) {
36
@@ -50,9 +48,9 @@ export function* group ( key , iterable ) {
50
48
51
49
52
53
- tgtkey = currkey ;
+ const tgtkey = currkey ;
54
55
- const g = grouper( ) ;
+ const g = grouper( tgtkey ) ;
56
57
yield [ tgtkey , g ] ;
58
0 commit comments