@@ -187,7 +187,7 @@ export async function loadApp() {
187187 const platform = PlatformPeg . get ( ) ;
188188
189189 // Load the config from the platform
190- const configInfo = await loadConfig ( ) ;
190+ const configError = await loadConfig ( ) ;
191191
192192 // Load language after loading config.json so that settingsDefaults.language can be applied
193193 await loadLanguage ( ) ;
@@ -216,7 +216,7 @@ export async function loadApp() {
216216 await setTheme ( ) ;
217217
218218 // Now that we've loaded the theme (CSS), display the config syntax error if needed.
219- if ( configInfo . configSyntaxError ) {
219+ if ( configError && configError . err && configError . err instanceof SyntaxError ) {
220220 const errorMessage = (
221221 < div >
222222 < p >
@@ -228,7 +228,7 @@ export async function loadApp() {
228228 < p >
229229 { _t (
230230 "The message from the parser is: %(message)s" ,
231- { message : configInfo . configError . err . message || _t ( "Invalid JSON" ) } ,
231+ { message : configError . err . message || _t ( "Invalid JSON" ) } ,
232232 ) }
233233 </ p >
234234 </ div >
@@ -248,7 +248,7 @@ export async function loadApp() {
248248
249249 const urlWithoutQuery = window . location . protocol + '//' + window . location . host + window . location . pathname ;
250250 console . log ( "Vector starting at " + urlWithoutQuery ) ;
251- if ( configInfo . configError ) {
251+ if ( configError ) {
252252 window . matrixChat = ReactDOM . render ( < div className = "error" >
253253 Unable to load config file: please refresh the page to try again.
254254 </ div > , document . getElementById ( 'matrixchat' ) ) ;
0 commit comments