fix: locale selector dropdown showing incorrect status in content man… (#23434)

This commit is contained in:
Yatin Gaikwad 2025-06-24 17:02:08 +02:00 committed by GitHub
parent 1366892f87
commit be26954af3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -285,7 +285,9 @@ export default ({ strapi }: { strapi: Core.Strapi }) => ({
const otherStatus = await this.getManyAvailableStatus(uid, document.localizations);
document.localizations = document.localizations.map((d) => {
const status = otherStatus.find((s) => s.documentId === d.documentId);
const status = otherStatus.find(
(s) => s.documentId === d.documentId && s.locale === d.locale
);
return {
...d,
status: this.getStatus(d, status ? [status] : []),