forked from MapComplete/MapComplete
		
	Fix bug: allow custom themes without icon
This commit is contained in:
		
							parent
							
								
									cd0d275965
								
							
						
					
					
						commit
						b96fb595de
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		|  | @ -170,10 +170,13 @@ export default class DetermineLayout { | |||
|         if (json.layers === undefined && json.tagRenderings !== undefined) { | ||||
|             // We got fed a layer instead of a theme
 | ||||
|             const layerConfig = <LayerConfigJson>json | ||||
|             const icon = Utils.NoNull( | ||||
|             let icon = Utils.NoNull( | ||||
|                 layerConfig.pointRendering | ||||
|                     .flatMap((pr) => pr.marker) | ||||
|                     .map((iconSpec) => { | ||||
|                         if(!iconSpec){ | ||||
|                             return undefined | ||||
|                         } | ||||
|                         const icon = new TagRenderingConfig(<TagRenderingConfigJson>iconSpec.icon) | ||||
|                             .render.txt | ||||
|                         if ( | ||||
|  | @ -189,6 +192,10 @@ export default class DetermineLayout { | |||
|                     }) | ||||
|             ).join(";") | ||||
| 
 | ||||
|             if(!icon){ | ||||
|                 icon = "./assets/svg/bug.svg" | ||||
|             } | ||||
| 
 | ||||
|             json = { | ||||
|                 id: json.id, | ||||
|                 description: json.description, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue