mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	client: Fix duplication when requesting scripts
This commit is contained in:
		
							parent
							
								
									1e9324c303
								
							
						
					
					
						commit
						e931df721d
					
				| @ -89,13 +89,14 @@ const MIND_ELIXIR = { | ||||
| const HIGHLIGHT_JS = { | ||||
|     js: () => { | ||||
|         const mimeTypes = mimeTypesService.getMimeTypes(); | ||||
|         const scriptsToLoad = [ "node_modules/@highlightjs/cdn-assets/highlight.min.js" ]; | ||||
|         const scriptsToLoad = new Set(); | ||||
|         scriptsToLoad.add("node_modules/@highlightjs/cdn-assets/highlight.min.js"); | ||||
|         for (const mimeType of mimeTypes) { | ||||
|             if (mimeType.enabled && mimeType.highlightJs) { | ||||
|                 scriptsToLoad.push(`node_modules/@highlightjs/cdn-assets/languages/${mimeType.highlightJs}.min.js`); | ||||
|                 scriptsToLoad.add(`node_modules/@highlightjs/cdn-assets/languages/${mimeType.highlightJs}.min.js`); | ||||
|             } | ||||
|         }         | ||||
|         return scriptsToLoad; | ||||
|         return Array.from(scriptsToLoad); | ||||
|     }, | ||||
|     css: [ "node_modules/@highlightjs/cdn-assets/styles/atom-one-dark.css" ] | ||||
| }; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran