fix: Fixing bug where Strapi UI is crashing when no locale is found

pull/150/head
Michael Razmgah 2024-10-14 09:49:14 +02:00 committed by GitHub
parent 79a4a0b41c
commit e74594a970
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 4 deletions

View File

@ -60,10 +60,21 @@ export default {
}; };
}) })
.catch(() => { .catch(() => {
return { return import(
data: {}, /* webpackChunkName: "config-sync-translation-[request]" */ `./translations/en.json`
locale, )
}; .then(({ default: data }) => {
return {
data: prefixPluginTranslations(data, pluginId),
locale,
};
})
.catch(() => {
return {
data: {},
locale,
};
});
}); });
}), }),
); );