I 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 3I'd split it in two parts.
1. const filtered = items.filter ...
2. return filtered .map ....
2 1Samuel
@samuel.fm
that’d work
1