mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 11:47:37 +08:00
refactor(mermaid): use different lazyloading mechanism
This commit is contained in:
parent
4fbe34ae13
commit
c15257da7e
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue