mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
⚡ Prevent race condition with headers
This commit is contained in:
@@ -240,9 +240,6 @@ export default mixins(
|
|||||||
// TODO i18n: Remove next line
|
// TODO i18n: Remove next line
|
||||||
console.log(`Switching locale from ${oldLocale} to ${newLocale}`); // eslint-disable-line no-console
|
console.log(`Switching locale from ${oldLocale} to ${newLocale}`); // eslint-disable-line no-console
|
||||||
loadLanguage(newLocale);
|
loadLanguage(newLocale);
|
||||||
|
|
||||||
const headers = await this.restApi().getNodeTranslationHeaders();
|
|
||||||
addHeaders(headers, this.$store.getters.defaultLocale);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async beforeRouteLeave(to, from, next) {
|
async beforeRouteLeave(to, from, next) {
|
||||||
@@ -2569,6 +2566,11 @@ export default mixins(
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await Promise.all(loadPromises);
|
await Promise.all(loadPromises);
|
||||||
|
|
||||||
|
if (this.defaultLocale !== 'en') {
|
||||||
|
const headers = await this.restApi().getNodeTranslationHeaders();
|
||||||
|
addHeaders(headers, this.defaultLocale);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$showError(
|
this.$showError(
|
||||||
error,
|
error,
|
||||||
|
|||||||
Reference in New Issue
Block a user