🐛 Update fetch language call to not retrieve from cache (#14099)

Co-authored-by: Ben Tran <bentran@Bens-Intel-MacBook-Pro.local>
This commit is contained in:
bbqben
2022-07-06 16:32:07 -04:00
committed by GitHub
parent 00b8f4fef5
commit 706cffa71d

View File

@@ -414,7 +414,15 @@ export default {
this.$store.state.isUserLoaded = true;
Analytics.setUser();
Analytics.updateUser();
return axios.get('/api/v4/i18n/browser-script', { language: this.user.preferences.language });
return axios.get('/api/v4/i18n/browser-script',
{
language: this.user.preferences.language,
headers: {
'Cache-Control': 'no-cache',
Pragma: 'no-cache',
Expires: '0',
},
});
}).then(() => {
const i18nData = window && window['habitica-i18n'];
this.$loadLocale(i18nData);