You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the time this might be okay (maybe? No one has noticed this but me 😅) but this is super intuitive when you use Array methods that perform operations in place, like .reverse(), it can give you unreliable results when you use it in two different calls.
Notably: the following will return two different results even though the code is the same 😭
https://www.11ty.io/docs/collections/#getallsorted() and maybe other methods too, needs to be looked at.
Most of the time this might be okay (maybe? No one has noticed this but me 😅) but this is super intuitive when you use Array methods that perform operations in place, like
.reverse()
, it can give you unreliable results when you use it in two different calls.Notably: the following will return two different results even though the code is the same 😭
Workaround for now is to create a copy of your results like so:
The obvious fix here is to do this by default in the
getAllSorted
method.The text was updated successfully, but these errors were encountered: