Don’t load browser-script again if it’s already the correct language (#15263)

This commit is contained in:
Phillip Thelen
2024-08-06 22:03:26 +02:00
parent b7cb743f14
commit 2298f4cf7b

View File

@@ -259,6 +259,11 @@ export default {
return null; return null;
} }
} }
if (window && window['habitica-i18n']) {
if (this.user.preferences.language === window['habitica-i18n'].language.code) {
return null;
}
}
return axios.get( return axios.get(
'/api/v4/i18n/browser-script', '/api/v4/i18n/browser-script',
{ {