mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	client: Fix color theme leak when deactivating highlighting
This commit is contained in:
		
							parent
							
								
									c3e10b2b76
								
							
						
					
					
						commit
						4d783f1879
					
				| @ -162,6 +162,15 @@ function loadHighlightingTheme(theme) { | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     if (theme === "none") { | ||||
|         // Deactivate the theme.
 | ||||
|         if (highlightingThemeEl) { | ||||
|             highlightingThemeEl.remove(); | ||||
|             highlightingThemeEl = null; | ||||
|         } | ||||
|         return; | ||||
|     } | ||||
|      | ||||
|     if (!highlightingThemeEl) { | ||||
|         highlightingThemeEl = $(`<link rel="stylesheet" type="text/css" />`); | ||||
|         $("head").append(highlightingThemeEl); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran