move configError check earlier, as SdkConfig will cause Exception
if it has undefined pass to it Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
ab09d4b632
commit
026a072278
1 changed files with 8 additions and 5 deletions
|
@ -264,6 +264,13 @@ async function loadApp() {
|
|||
|
||||
const configJson = await loadConfig();
|
||||
|
||||
if (!configJson) {
|
||||
window.matrixChat = ReactDOM.render(<div className="error">
|
||||
Unable to load config file: please refresh the page to try again.
|
||||
</div>, document.getElementById('matrixchat'));
|
||||
return;
|
||||
}
|
||||
|
||||
// XXX: We call this twice, once here and once in MatrixChat as a prop. We call it here to ensure
|
||||
// granular settings are loaded correctly and to avoid duplicating the override logic for the theme.
|
||||
SdkConfig.put(configJson);
|
||||
|
@ -343,11 +350,7 @@ async function loadApp() {
|
|||
}
|
||||
|
||||
console.log("Vector starting at "+window.location);
|
||||
if (!configJson) {
|
||||
window.matrixChat = ReactDOM.render(<div className="error">
|
||||
Unable to load config file: please refresh the page to try again.
|
||||
</div>, document.getElementById('matrixchat'));
|
||||
} else if (validBrowser) {
|
||||
if (validBrowser) {
|
||||
const platform = PlatformPeg.get();
|
||||
platform.startUpdater();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue