live2D 遮罩BUG

This commit is contained in:
tangly1024
2022-01-04 12:28:44 +08:00
parent 1f705ec3e3
commit 32935320ab

View File

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