Skip to content

Commit

Permalink
fix: Fix empty person response crashing (#24308)
Browse files Browse the repository at this point in the history
  • Loading branch information
webjunkie authored Aug 12, 2024
1 parent 500ec20 commit c67aed7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/src/scenes/persons/personsLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export const personsLogic = kea<personsLogicType>([
{
loadPerson: async ({ id }): Promise<PersonType | null> => {
const response = await api.persons.list({ distinct_id: id })
if (!response.results.length) {
return null
}
const person = response.results[0]
if (person) {
actions.reportPersonDetailViewed(person)
Expand Down

0 comments on commit c67aed7

Please sign in to comment.