diff --git a/components/Twikoo.js b/components/Twikoo.js index 17ef8b8bf54..6899cfaa58f 100644 --- a/components/Twikoo.js +++ b/components/Twikoo.js @@ -16,7 +16,7 @@ const Twikoo = ({ isDarkMode }) => { const lang = siteConfig('LANG') useEffect(() => { const twikoo = window?.twikoo - if (typeof twikoo !== 'undefined' && twikoo) { + if (typeof twikoo !== 'undefined' && twikoo && typeof twikoo.init === 'function') { twikoo.init({ envId: envId, // 腾讯云环境填 envId;Vercel 环境填地址(https://xxx.vercel.app) el: el, // 容器元素