From 730cb003b19a061cd50ced26e0bb08ccd9a332f8 Mon Sep 17 00:00:00 2001 From: _Kerman Date: Thu, 19 Dec 2024 22:06:12 +0800 Subject: [PATCH] chore: update --- packages/slidev/node/setups/indexHtml.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/slidev/node/setups/indexHtml.ts b/packages/slidev/node/setups/indexHtml.ts index a9c03a9c41..4c0668bcd7 100644 --- a/packages/slidev/node/setups/indexHtml.ts +++ b/packages/slidev/node/setups/indexHtml.ts @@ -49,11 +49,13 @@ export default function setupIndexHtml({ mode, entry, clientRoot, userRoot, root if (data.features.tweet) body += '\n' - if (data.config.fonts.webfonts.length && data.config.fonts.provider === 'google') - head += `\n` - - if (data.config.fonts.webfonts.length && data.config.fonts.provider === 'coollabs') - head += `\n` + if (data.config.fonts.webfonts.length) { + const { provider } = data.config.fonts + if (provider === 'google') + head += `\n` + else if (provider === 'coollabs') + head += `\n` + } if (data.headmatter.lang) main = main.replace('', ``)