forked from MapComplete/MapComplete
		
	Add error handling for advancedJsonDownload
This commit is contained in:
		
							parent
							
								
									293e03be46
								
							
						
					
					
						commit
						0074e39934
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -147,6 +147,9 @@ export default class Wikipedia { | |||
|                 }, | ||||
|             ] | ||||
|         } | ||||
|         if(result["error"]){ | ||||
|             throw "Could not download: "+JSON.stringify(result) | ||||
|         } | ||||
|         const el = document.createElement("html") | ||||
|         el.innerHTML = result["content"].replace(/href="\//g, 'href="' + this.backend + "/") | ||||
|         const searchResults = el.getElementsByClassName("mw-search-results") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue