From 82275ddf3edc3479a3103771b7d76b099c0b166b Mon Sep 17 00:00:00 2001 From: Kar Rui Lau Date: Wed, 7 Aug 2024 12:55:17 +0800 Subject: [PATCH] feat: turn on noUncheckedIndexedAccess to remove class of bugs --- .../ArticlePageHeader/ArticlePageHeader.tsx | 2 +- .../internal/Breadcrumb/Breadcrumb.tsx | 12 +++++---- .../next/components/native/Table/Table.tsx | 27 ++++++++++--------- packages/components/tsconfig.json | 1 + 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/packages/components/src/templates/next/components/internal/ArticlePageHeader/ArticlePageHeader.tsx b/packages/components/src/templates/next/components/internal/ArticlePageHeader/ArticlePageHeader.tsx index f07dc69e94..3380fcc3ac 100644 --- a/packages/components/src/templates/next/components/internal/ArticlePageHeader/ArticlePageHeader.tsx +++ b/packages/components/src/templates/next/components/internal/ArticlePageHeader/ArticlePageHeader.tsx @@ -25,7 +25,7 @@ const ArticlePageHeader = ({

{date}

- {summary.length === 1 ? ( + {summary.length === 1 && summary[0] ? ( ) : (
    diff --git a/packages/components/src/templates/next/components/internal/Breadcrumb/Breadcrumb.tsx b/packages/components/src/templates/next/components/internal/Breadcrumb/Breadcrumb.tsx index f562379f4c..a47f5b9395 100644 --- a/packages/components/src/templates/next/components/internal/Breadcrumb/Breadcrumb.tsx +++ b/packages/components/src/templates/next/components/internal/Breadcrumb/Breadcrumb.tsx @@ -20,11 +20,13 @@ const Breadcrumb = ({ links, LinkComponent = "a" }: BreadcrumbProps) => { return (