Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fixed `TypeError: Cannot read properties of undefined (reading 'website_id')`
Dhravya Shahaaf0effcbbb1
diff --git a/components/pages/DashboardEdit.js b/components/pages/DashboardEdit.jsindex d06f32f95..4b515f253 100644--- a/components/pages/DashboardEdit.js+++ b/components/pages/DashboardEdit.js@@ -23,7 +23,6 @@ export default function DashboardEdit({ websites }) {const ordered = useMemo(() => sortArrayByMap(websites, order, 'website_id'), [websites, order]);- console.log({ order, ordered });function handleWebsiteDrag({ destination, source }) {if (!destination || destination.index === source.index) return;@@ -32,7 +31,7 @@ export default function DashboardEdit({ websites }) {const [removed] = orderedWebsites.splice(source.index, 1);orderedWebsites.splice(destination.index, 0, removed);- setOrder(orderedWebsites.map(({ website_id }) => website_id));+ setOrder(orderedWebsites.map((website) => website?.website_id || 0));}function handleSave() {