Skip to content

Commit e74594a

Browse files
fix: Fixing bug where Strapi UI is crashing when no locale is found
1 parent 79a4a0b commit e74594a

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

admin/src/index.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,21 @@ export default {
6060
};
6161
})
6262
.catch(() => {
63-
return {
64-
data: {},
65-
locale,
66-
};
63+
return import(
64+
/* webpackChunkName: "config-sync-translation-[request]" */ `./translations/en.json`
65+
)
66+
.then(({ default: data }) => {
67+
return {
68+
data: prefixPluginTranslations(data, pluginId),
69+
locale,
70+
};
71+
})
72+
.catch(() => {
73+
return {
74+
data: {},
75+
locale,
76+
};
77+
});
6778
});
6879
}),
6980
);

0 commit comments

Comments
 (0)