From 4642a8784a99ab44ee51aa6606cc92e8ade54701 Mon Sep 17 00:00:00 2001 From: DiamondYuan Date: Tue, 19 Nov 2024 19:55:32 +0800 Subject: [PATCH] fix: fix lint error --- src/components/ProjectSelector.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ProjectSelector.tsx b/src/components/ProjectSelector.tsx index ee24f272..fe783a2f 100644 --- a/src/components/ProjectSelector.tsx +++ b/src/components/ProjectSelector.tsx @@ -37,14 +37,14 @@ class ProjectSelector extends React.Component { // Function to check if a project or its ancestors are excluded const isProjectOrAncestorExcluded = (projectId: string): boolean => { - let current: string | null = projectId + let current: string | undefined = projectId while (current) { if (current === this.props.excludeProjectId) { return true } // eslint-disable-next-line no-loop-func const parentProject = allProjects.find((p) => p.id === current) - current = parentProject?.parentProjectId ?? null + current = parentProject?.parentProjectId } return false }