refactor(mermaid): use different lazyloading mechanism

This commit is contained in:
Elian Doran 2025-03-22 14:50:05 +02:00
parent 4fbe34ae13
commit c15257da7e
No known key found for this signature in database

View File

@ -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 );
}
}