mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 02:02:14 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/develop' into dbkr/electron_3
This commit is contained in:
		
						commit
						6869c679ef
					
				@ -179,12 +179,15 @@ function getConfig() {
 | 
				
			|||||||
            if (err || response.status < 200 || response.status >= 300) {
 | 
					            if (err || response.status < 200 || response.status >= 300) {
 | 
				
			||||||
                // Lack of a config isn't an error, we should
 | 
					                // Lack of a config isn't an error, we should
 | 
				
			||||||
                // just use the defaults.
 | 
					                // just use the defaults.
 | 
				
			||||||
                // Also treat a blank config as no config because
 | 
					                // Also treat a blank config as no config, assuming
 | 
				
			||||||
                // we don't get 404s from file: URIs so this is the
 | 
					                // the status code is 0, because we don't get 404s
 | 
				
			||||||
                // only way we can not fail if the file doesn't exist
 | 
					                // from file: URIs so this is the only way we can
 | 
				
			||||||
                // when loading from a file:// URI.
 | 
					                // not fail if the file doesn't exist when loading
 | 
				
			||||||
                if (( err && err.response.status == 404) || body == '') {
 | 
					                // from a file:// URI.
 | 
				
			||||||
                    deferred.resolve({});
 | 
					                if (response) {
 | 
				
			||||||
 | 
					                    if (response.status == 404 || (response.status == 0 && body == '')) {
 | 
				
			||||||
 | 
					                        deferred.resolve({});
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                deferred.reject({err: err, response: response});
 | 
					                deferred.reject({err: err, response: response});
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user