Describe the bug
I integrated Sanity with another CMS to pull translations from it. So I've faced with the problem that I can't see my published document. After my investigation I found the problem in sorting algorytm.
To Reproduce
- Create a release in Sanity
- Push the document with random langugage order in this release with API
- Do not open the version of this document befor release
- Publish the release
- Open published document
Expected behavior
I can see published document in sanity
Screenshots
Which versions of Sanity are you using?
3.98.0
What operating system are you using?
MacOS 15.5
Which versions of Node.js / npm are you running?
10.2.4
Additional context
I guess the problem in this funcion

Describe the bug
I integrated Sanity with another CMS to pull translations from it. So I've faced with the problem that I can't see my published document. After my investigation I found the problem in sorting algorytm.
To Reproduce
Expected behavior
I can see published document in sanity
Screenshots
Which versions of Sanity are you using?
3.98.0
What operating system are you using?
MacOS 15.5
Which versions of Node.js / npm are you running?
10.2.4
Additional context

I guess the problem in this funcion