Fix config validation

This commit is contained in:
James Lyne 2021-07-22 22:49:38 +01:00
parent 0b48e09e4a
commit b9807b3a7b

View File

@ -107,8 +107,8 @@ export const getServerDefinitions = (config: LiveAtlasGlobalConfig): Map<string,
throw new ConfigurationError(`Configuration object is missing`);
}
if (typeof config !== 'undefined') {
return validateLiveAtlasConfiguration(config.servers || {});
if (typeof config.servers !== 'undefined') {
return validateLiveAtlasConfiguration(config.servers);
}
return validateDynmapConfiguration(window.config?.url || null);