fuckface "squeaky" from:me
ah, this is why you use the third argument to map functions, which passes the array being mapped - a correct line 9 could shadow it by changing the invocation to `.map((item, i, items) => {`
2 3
fuckface "squeaky" from:me
one could also argue that `items` ought to come in as an argument, and whatever larger object provides an argumentless variant for a fixed `items` should be binding that function in its constructor
1 1
fuckface "squeaky" from:me
yeah, for all my griping about how JavaScript code ought to embrace lexical scoping more heavily, seeing it being spelled `this.items` probably would have made this bug a little more obvious to me
1 2
Samuel
@samuel.fm
yeah in our code it wasn't `this.items` because items was a new array, but I agree it would've been way easier to spot
1