From c67aed78ed4316c98121ff9d6c370302ffd20874 Mon Sep 17 00:00:00 2001 From: Julian Bez Date: Mon, 12 Aug 2024 14:02:47 +0100 Subject: [PATCH] fix: Fix empty person response crashing (#24308) --- frontend/src/scenes/persons/personsLogic.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/scenes/persons/personsLogic.tsx b/frontend/src/scenes/persons/personsLogic.tsx index 536ff6dfe2b34..7d92c0593eb54 100644 --- a/frontend/src/scenes/persons/personsLogic.tsx +++ b/frontend/src/scenes/persons/personsLogic.tsx @@ -102,6 +102,9 @@ export const personsLogic = kea([ { loadPerson: async ({ id }): Promise => { 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)