Skip to content

Commit

Permalink
fix: Fixing bug where Strapi UI is crashing when no locale is found
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrazmgah authored Oct 14, 2024
1 parent 79a4a0b commit e74594a
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions admin/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,21 @@ export default {
};
})
.catch(() => {
return {
data: {},
locale,
};
return import(
/* webpackChunkName: "config-sync-translation-[request]" */ `./translations/en.json`
)
.then(({ default: data }) => {
return {
data: prefixPluginTranslations(data, pluginId),
locale,
};
})
.catch(() => {
return {
data: {},
locale,
};
});
});
}),
);
Expand Down

0 comments on commit e74594a

Please sign in to comment.