tweak button handler; check if disabled first
This commit is contained in:
		
							parent
							
								
									ef9f12d0fd
								
							
						
					
					
						commit
						e80b6e7104
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -18,11 +18,11 @@ | ||||||
|     if (centered) classes.push("centered"); |     if (centered) classes.push("centered"); | ||||||
| 
 | 
 | ||||||
|     function click() { |     function click() { | ||||||
|  |         if (disabled) return; | ||||||
|         if (href) { |         if (href) { | ||||||
|             location = href; |             location = href; | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|         if (disabled) return; |  | ||||||
|         play_sound(sound); |         play_sound(sound); | ||||||
|         dispatch('click'); |         dispatch('click'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue