forked from MapComplete/MapComplete
		
	Fix: don't crash if 't' is undefined
This commit is contained in:
		
							parent
							
								
									55a6cda062
								
							
						
					
					
						commit
						b1c4097cb4
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -9,12 +9,12 @@
 | 
				
			||||||
  export let t: Translation
 | 
					  export let t: Translation
 | 
				
			||||||
  export let cls: string = ""
 | 
					  export let cls: string = ""
 | 
				
			||||||
  // Text for the current language
 | 
					  // Text for the current language
 | 
				
			||||||
  let txt: Store<string | undefined> = t.current
 | 
					  let txt: Store<string | undefined> = t?.current
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{#if t}
 | 
					{#if txt}
 | 
				
			||||||
  <span class={cls}>
 | 
					  <span class={cls}>
 | 
				
			||||||
    {$txt}
 | 
					    {$txt}
 | 
				
			||||||
    <WeblateLink context={t.context} />
 | 
					    <WeblateLink context={t.context} />
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue