Array.prototype.toReversed() works at runtime but not build

I have an Astro project that uses
toReversed()
on a json import, this works fine on SSR pages but fails saying that the function is not defined during build on an SSG page.
Was this page helpful?