fix: Update null check in PhotoViewerClient component for improved type safety
Some checks failed
CI / skip-ci-check (push) Successful in 1m27s
CI / skip-ci-check (pull_request) Successful in 1m26s
CI / python-lint (push) Has been cancelled
CI / test-backend (push) Has been cancelled
CI / build (push) Has been cancelled
CI / secret-scanning (push) Has been cancelled
CI / dependency-scan (push) Has been cancelled
CI / sast-scan (push) Has been cancelled
CI / workflow-summary (push) Has been cancelled
CI / lint-and-type-check (push) Has been cancelled
CI / lint-and-type-check (pull_request) Successful in 2m5s
CI / python-lint (pull_request) Successful in 1m52s
CI / test-backend (pull_request) Successful in 2m54s
CI / build (pull_request) Successful in 2m23s
CI / secret-scanning (pull_request) Successful in 1m40s
CI / dependency-scan (pull_request) Successful in 1m32s
CI / sast-scan (pull_request) Successful in 2m41s
CI / workflow-summary (pull_request) Successful in 1m26s

This commit modifies the null check in the `PhotoViewerClient` component to use `!=` instead of `!==`, ensuring that the filter correctly identifies non-null persons. This change enhances type safety and maintains consistency in handling potential null values.
This commit is contained in:
Tanya 2026-01-07 14:28:34 -05:00
parent 2e735f3b5a
commit 8f8aa33503

View File

@ -1075,7 +1075,7 @@ export function PhotoViewerClient({
const peopleNames = (currentPhoto as any).faces
?.map((face: any) => face.Person)
.filter((person: any): person is Person => person !== null)
.filter((person: any): person is Person => person != null)
.map((person: Person) => `${person.first_name} ${person.last_name}`.trim()) || [];
const tags = (currentPhoto as any).PhotoTagLinkage?.map((pt: any) => pt.Tag.tag_name) || [];