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 }