From 2b7ef74edd310a88d758a72f9aca0537fa6a21d9 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 7 Aug 2023 18:25:02 +0800 Subject: [PATCH] mermaid --- components/PrismMac.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/PrismMac.js b/components/PrismMac.js index 38742281..0a69e55e 100644 --- a/components/PrismMac.js +++ b/components/PrismMac.js @@ -140,8 +140,10 @@ const renderMermaid = async() => { } if (needLoad) { loadExternalResource(BLOG.MERMAID_CDN, 'js').then(url => { - const mermaid = window.mermaid - mermaid.contentLoaded() + setTimeout(() => { + const mermaid = window.mermaid + mermaid?.contentLoaded() + }, 100) }) } }