From c727bed0e8d893d0badad1d28f1facad3346a009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com> Date: Fri, 13 Oct 2023 05:18:07 -0500 Subject: [PATCH] chore: solve the eslint error about null (#45328) --- .dumi/theme/plugin.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.dumi/theme/plugin.ts b/.dumi/theme/plugin.ts index 9aeabef190..90a1490d0a 100644 --- a/.dumi/theme/plugin.ts +++ b/.dumi/theme/plugin.ts @@ -155,12 +155,12 @@ const RoutesPlugin = (api: IApi) => { // 2. 提取每个样式到独立 css 文件 styles.forEach((result) => { api.logger.event( - `${chalk.yellow(file.path)} include ${chalk.blue`[${result.key}]`} ${chalk.yellow( - result.ids.length, + `${chalk.yellow(file.path)} include ${chalk.blue`[${result!.key}]`} ${chalk.yellow( + result!.ids.length, )} styles`, ); - const cssFile = writeCSSFile(result.key, result.ids.join(''), result.css); + const cssFile = writeCSSFile(result!.key, result!.ids.join(''), result!.css); file.content = addLinkStyle(file.content, cssFile); });