Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Fix: TypeError: Cannot destructure property 'index' of 's[0]' as it is null

Blue Mouse118513a1e03e
diff --git a/app/pages/Project/View/ViewProject.helpers.tsx b/app/pages/Project/View/ViewProject.helpers.tsx
index a5f1a7e04..c9641af19 100644
--- a/app/pages/Project/View/ViewProject.helpers.tsx
+++ b/app/pages/Project/View/ViewProject.helpers.tsx
@@ -1121,7 +1121,7 @@ const getSettingsFunnels = (funnel: IAnalyticsFunnel[], totalPageviews: number,
},
tooltip: {
contents: (items: any, _: any, __: any, color: any) => {
- const { index } = items[0]
+ const { index = 0 } = items[0] || {}
const step = funnel[index]
const stepTitle = values[index]
const prevStepTitle = values[index - 1]