forked from MapComplete/MapComplete
		
	Fix bugs with loading of themes
This commit is contained in:
		
							parent
							
								
									07e611bf10
								
							
						
					
					
						commit
						e0694fee9d
					
				
					 4 changed files with 12 additions and 6 deletions
				
			
		|  | @ -41,9 +41,13 @@ export default class SavePanel extends UIElement { | |||
|         this.json = jsonTextField; | ||||
|         this.loadFromJson = new SubtleButton("./assets/reload.svg", "<b>Load the JSON file below</b>") | ||||
|             .onClick(() => { | ||||
|                 const json = jsonTextField.GetValue().data; | ||||
|                 const parsed : LayoutConfigJson = JSON.parse(json); | ||||
|                 config.setData(parsed); | ||||
|                 try{ | ||||
|                     const json = jsonTextField.GetValue().data; | ||||
|                     const parsed : LayoutConfigJson = JSON.parse(json); | ||||
|                     config.setData(parsed); | ||||
|                 }catch(e){ | ||||
|                     alert("Invalid JSON: "+e) | ||||
|                 } | ||||
|             }); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue