Handle cases of no default server
parent
45caa8baab
commit
bf97fd67b4
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"Unexpected error preparing the app. See console for details.": "Unexpected error preparing the app. See console for details.",
|
||||
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.",
|
||||
"Invalid configuration: no default server specified": "Invalid configuration: no default server specified",
|
||||
"Riot Desktop on %(platformName)s": "Riot Desktop on %(platformName)s",
|
||||
"Unknown device": "Unknown device",
|
||||
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s via %(browserName)s on %(osName)s",
|
||||
|
|
|
@ -452,8 +452,6 @@ async function verifyServerConfig() {
|
|||
// TODO: TravisR - Handle query string arguments for hs_url and is_url
|
||||
// We probably don't want to handle them unless the user is logged out though?
|
||||
|
||||
// TODO: TravisR - Handle case of no options specified whatsoever
|
||||
|
||||
const config = SdkConfig.get();
|
||||
let wkConfig = config['default_server_config']; // overwritten later under some conditions
|
||||
const serverName = config['default_server_name'];
|
||||
|
@ -467,6 +465,9 @@ async function verifyServerConfig() {
|
|||
"or default_hs_url.",
|
||||
));
|
||||
}
|
||||
if (incompatibleOptions.length < 1) {
|
||||
throw newTranslatableError(_td("Invalid configuration: no default server specified."));
|
||||
}
|
||||
|
||||
if (hsUrl) {
|
||||
console.log("Config uses a default_hs_url - constructing a default_server_config using this information");
|
||||
|
|
Loading…
Reference in New Issue