fix listiterator.map returning undefined as the last element

This commit is contained in:
Kevin Jahns 2021-11-21 00:44:37 +01:00
parent 6df152c4ec
commit 4a8ebc31f7

View File

@ -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)