📈 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!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
fix custom events logic
Blue Mousec805944066b8
diff --git a/web/app/pages/Project/View/ViewProject.tsx b/web/app/pages/Project/View/ViewProject.tsxindex 14d0d9206..8943fcccb 100644--- a/web/app/pages/Project/View/ViewProject.tsx+++ b/web/app/pages/Project/View/ViewProject.tsx@@ -4,7 +4,6 @@ import billboard, { Chart } from 'billboard.js'import cx from 'clsx'import dayjs from 'dayjs'import _debounce from 'lodash/debounce'-import _every from 'lodash/every'import _filter from 'lodash/filter'import _find from 'lodash/find'import _findIndex from 'lodash/findIndex'@@ -1058,11 +1057,7 @@ const ViewProject = () => {to = getFormatDate(dateRange[1])}- const isAllActiveChartMetricsCustomEvents = _every(activeChartMetricsCustomEvents, (metric) => {- return _includes(_keys(customEventsChartData), metric)- })-- if (!isAllActiveChartMetricsCustomEvents) {+ if (activeChartMetricsCustomEvents.length > 0) {if (period === 'custom' && dateRange) {data = await getProjectDataCustomEvents(id,@@ -1896,7 +1891,7 @@ const ViewProject = () => {}, [mode, activeTab, customMetrics, filters, authLoading, project, isActiveCompare, dateRange, period, timeBucket])useEffect(() => {- if (activeTab !== PROJECT_TABS.traffic || authLoading || !project || activeChartMetricsCustomEvents.length === 0) {+ if (activeTab !== PROJECT_TABS.traffic || authLoading || !project) {return}