fix listiterator.map returning undefined as the last element
This commit is contained in:
parent
6df152c4ec
commit
4a8ebc31f7
@ -416,7 +416,7 @@ export class ListIterator {
|
||||
return this
|
||||
},
|
||||
next: () => {
|
||||
if (this.reachedEnd) {
|
||||
if (this.reachedEnd || this.index === this.type._length) {
|
||||
return { done: true }
|
||||
}
|
||||
const [value] = this.slice(tr, 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user