From 32935320ab0797b6ebd16a803c6a4af1ee0dd996 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 4 Jan 2022 12:28:44 +0800 Subject: [PATCH] =?UTF-8?q?live2D=20=E9=81=AE=E7=BD=A9BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Live2D.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }