Suggest solutions for missing config object

This commit is contained in:
James Lyne 2021-12-09 18:26:20 +00:00
parent 5a778828f8
commit b98f37729d
2 changed files with 2 additions and 2 deletions

View File

@ -76,5 +76,5 @@ try {
app.mount('#app'); app.mount('#app');
} catch(e) { } catch(e) {
console.error('LiveAtlas configuration is invalid: ', e); console.error('LiveAtlas configuration is invalid: ', e);
showSplashError('LiveAtlas configuration is invalid\n' + e, true); showSplashError('LiveAtlas configuration is invalid:\n' + e, true);
} }

View File

@ -122,7 +122,7 @@ const validateDynmapConfiguration = (config: DynmapUrlConfig): Map<string, LiveA
export const getServerDefinitions = (config: LiveAtlasGlobalConfig): Map<string, LiveAtlasServerDefinition> => { export const getServerDefinitions = (config: LiveAtlasGlobalConfig): Map<string, LiveAtlasServerDefinition> => {
if (!config) { if (!config) {
throw new ConfigurationError(`Configuration object is missing`); throw new ConfigurationError(`No configuration found.\nCheck for any syntax errors in your configuration in index.html. Your browser console may contain additional information.`);
} }
if (typeof config.servers !== 'undefined') { if (typeof config.servers !== 'undefined') {