Samuel
@samuel.fm
Nope! it’s JS, so it’s just undefined ;)
2 1I guess the real bug is that the code to get the next accesses the original items array whereas the map function runs on a filtered array from which items may be removed.
Just don't have deleted items and all will be fine...
1 3These kind of posts gives me butterflies in my tummy 😳
3I'd split it in two parts.
1. const filtered = items.filter ...
2. return filtered .map ....
2 1that’d work
1Not sure if there would be performance and/or additional memory costs though.
I probably cannot count on the compiler to optimize the code. :-)
1 1This was also my thought, although I'd call it something cool like nondeletedItems
1 2We really have to spell out everything for those bsky devs.
2Lovely
1