Suggest solutions for missing config object
This commit is contained in:
parent
5a778828f8
commit
b98f37729d
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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') {
|
||||||
|
Loading…
Reference in New Issue
Block a user