diff --git a/components/Live2D.js b/components/Live2D.js index eef9f7e2..e6d924ef 100644 --- a/components/Live2D.js +++ b/components/Live2D.js @@ -3,7 +3,11 @@ import BLOG from '@/blog.config' let hasLoad = false export default function Live2D () { - if (BLOG.widget?.showPet && typeof window !== 'undefined' && !hasLoad) { + if (!BLOG.widget?.showPet) { + return <> + } + + if (typeof window !== 'undefined' && !hasLoad) { initLive2D() hasLoad = true }