mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-23 11:44:06 -08:00
⚡ Prevent race condition with headers
This commit is contained in:
parent
d2c79d3ef0
commit
e22febb3f3
|
@ -240,9 +240,6 @@ export default mixins(
|
|||
// TODO i18n: Remove next line
|
||||
console.log(`Switching locale from ${oldLocale} to ${newLocale}`); // eslint-disable-line no-console
|
||||
loadLanguage(newLocale);
|
||||
|
||||
const headers = await this.restApi().getNodeTranslationHeaders();
|
||||
addHeaders(headers, this.$store.getters.defaultLocale);
|
||||
},
|
||||
},
|
||||
async beforeRouteLeave(to, from, next) {
|
||||
|
@ -2569,6 +2566,11 @@ export default mixins(
|
|||
|
||||
try {
|
||||
await Promise.all(loadPromises);
|
||||
|
||||
if (this.defaultLocale !== 'en') {
|
||||
const headers = await this.restApi().getNodeTranslationHeaders();
|
||||
addHeaders(headers, this.defaultLocale);
|
||||
}
|
||||
} catch (error) {
|
||||
this.$showError(
|
||||
error,
|
||||
|
|
Loading…
Reference in a new issue