forked from MapComplete/MapComplete
		
	Correct path for SVG templates
This commit is contained in:
		
							parent
							
								
									9a8586f8f0
								
							
						
					
					
						commit
						ac93c264c5
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -92,7 +92,7 @@ class SelectTemplate extends Combine implements FlowStep<{ title: string, pages: | ||||||
|                 if (pages === undefined) { |                 if (pages === undefined) { | ||||||
|                     return new Loading() |                     return new Loading() | ||||||
|                 } |                 } | ||||||
|                 if (pages["err"] !== undefined) { |                 if (pages["error"] !== undefined) { | ||||||
|                     return new FixedUiElement("Loading preview failed: " + pages["err"]).SetClass("alert") |                     return new FixedUiElement("Loading preview failed: " + pages["err"]).SetClass("alert") | ||||||
|                 } |                 } | ||||||
|                 const svgs = pages["success"].pages |                 const svgs = pages["success"].pages | ||||||
|  | @ -123,7 +123,9 @@ class SelectTemplate extends Combine implements FlowStep<{ title: string, pages: | ||||||
|         if (spec.startsWith("http")) { |         if (spec.startsWith("http")) { | ||||||
|             return spec |             return spec | ||||||
|         } |         } | ||||||
|         return window.location.protocol + "//" + window.location.host + "/" + spec |         let path = window.location.pathname | ||||||
|  |         path = path.substring(0, path.lastIndexOf("/")) | ||||||
|  |         return window.location.protocol + "//" + window.location.host + path +  + "/" + spec | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue