mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 07:05:52 -05:00
Fixed server crash when meshcentral-web has no translations.
This commit is contained in:
parent
c4a7a15b13
commit
17fd0a0963
@ -4398,9 +4398,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// See if there are any custom rending pages that will override the default ones
|
// See if there are any custom rending pages that will override the default ones
|
||||||
if (obj.parent.webViewsOverridePath != null) {
|
if ((obj.parent.webViewsOverridePath != null) && (obj.fs.existsSync(obj.path.join(obj.parent.webViewsOverridePath, 'translations')))) {
|
||||||
translateFolder = null;
|
translateFolder = obj.path.join(obj.parent.webViewsOverridePath, 'translations');
|
||||||
if (obj.fs.existsSync(obj.path.join(obj.parent.webViewsOverridePath, 'translations'))) { translateFolder = obj.path.join(obj.parent.webViewsOverridePath, 'translations'); }
|
|
||||||
var files = obj.fs.readdirSync(translateFolder);
|
var files = obj.fs.readdirSync(translateFolder);
|
||||||
for (var i in files) {
|
for (var i in files) {
|
||||||
var name = files[i];
|
var name = files[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user