forked from MapComplete/MapComplete
		
	Themes: add warning if a tagRendering can be replaced by a direct value
This commit is contained in:
		
							parent
							
								
									29b1f5be4d
								
							
						
					
					
						commit
						79e40d0fee
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -813,6 +813,12 @@ class MiscTagRenderingChecks extends DesugaringStep<TagRenderingConfigJson> { | |||
|             ) | ||||
|         } | ||||
| 
 | ||||
|         if (Object.keys(json).length === 1 && typeof json["render"] === "string") { | ||||
|             context.warn( | ||||
|                 `use the content directly instead of {render: ${JSON.stringify(json["render"])}}` | ||||
|             ) | ||||
|         } | ||||
| 
 | ||||
|         { | ||||
|             for (const key of ["question", "questionHint", "render"]) { | ||||
|                 CheckTranslation.allowUndefined.convert(json[key], context.enter(key)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue