mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 07:01:31 +08:00 
			
		
		
		
	refactor(mermaid): use different lazyloading mechanism
This commit is contained in:
		
							parent
							
								
									4fbe34ae13
								
							
						
					
					
						commit
						c15257da7e
					
				@ -287,9 +287,9 @@ export default class MermaidEditing extends Plugin {
 | 
			
		||||
	 */
 | 
			
		||||
	async _renderMermaid( domElement ) {
 | 
			
		||||
		if (!window.mermaid && typeof this._config?.lazyLoad === "function") {
 | 
			
		||||
			await this._config.lazyLoad();
 | 
			
		||||
			this.mermaid = await this._config.lazyLoad();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		mermaid.init( this._config.config, domElement );
 | 
			
		||||
		this.mermaid.init( this._config.config, domElement );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user