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: dashboard crash

Blue Mouse97ec78d7e8cc
diff --git a/src/pages/Project/View/ViewProject.jsx b/src/pages/Project/View/ViewProject.jsx
index 7aa232778..a185ecaf8 100644
--- a/src/pages/Project/View/ViewProject.jsx
+++ b/src/pages/Project/View/ViewProject.jsx
@@ -1586,7 +1586,7 @@ const ViewProject = ({
projectId={id}
/>
)}
- {_map(TRAFFIC_PANELS_ORDER, (type) => {
+ {!_isEmpty(panelsData.types) && _map(TRAFFIC_PANELS_ORDER, (type) => {
const panelName = tnMapping[type]
const panelIcon = panelIconMapping[type]
const customTabs = _filter(customPanelTabs, tab => tab.panelID === type)
@@ -1691,7 +1691,7 @@ const ViewProject = ({
</div>
)}
<div className='mt-5 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3'>
- {_map(PERFORMANCE_PANELS_ORDER, (type) => {
+ {!_isEmpty(panelsDataPerf.types) && _map(PERFORMANCE_PANELS_ORDER, (type) => {
const panelName = tnMapping[type]
const panelIcon = panelIconMapping[type]
const customTabs = _filter(customPanelTabs, tab => tab.panelID === type)