mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-27 16:02:16 +03:00
Added try/catch on util-language just in case
This commit is contained in:
parent
8fe748b4f3
commit
da0f59bc9a
@ -96,12 +96,17 @@ function setDefaultCoreTranslation(obj, field, value)
|
||||
function getCoreTranslation()
|
||||
{
|
||||
var ret = {};
|
||||
var lang = require('util-language').current;
|
||||
if (global.coretranslations != null)
|
||||
{
|
||||
if (coretranslations[lang] == null) { lang = lang.split('-')[0]; }
|
||||
if (coretranslations[lang] == null) { lang = 'en'; }
|
||||
if (coretranslations[lang] != null) { ret = coretranslations[lang]; }
|
||||
try
|
||||
{
|
||||
var lang = require('util-language').current;
|
||||
if (coretranslations[lang] == null) { lang = lang.split('-')[0]; }
|
||||
if (coretranslations[lang] == null) { lang = 'en'; }
|
||||
if (coretranslations[lang] != null) { ret = coretranslations[lang]; }
|
||||
}
|
||||
catch (x)
|
||||
{ }
|
||||
}
|
||||
|
||||
setDefaultCoreTranslation(ret, 'allow', 'Allow');
|
||||
|
Loading…
Reference in New Issue
Block a user