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!

fixed Infinity% custom events conversion bug

Blue Mouse87128645e24b
diff --git a/src/pages/Project/View/Panels.tsx b/src/pages/Project/View/Panels.tsx
index 3d504ba8f..4364a1eed 100644
--- a/src/pages/Project/View/Panels.tsx
+++ b/src/pages/Project/View/Panels.tsx
@@ -574,7 +574,11 @@ const CustomEvents = ({
  
</td>
<td className='text-right'>
- {_round((customsEventsData[ev] / uniques) * 100, 2)}
+ {/*
+ Added a uniques === 0 check because uniques value may be zero and dividing by zero will cause an
+ Infinity% value to be displayed.
+ */}
+ {uniques === 0 ? 100 : _round((customsEventsData[ev] / uniques) * 100, 2)}
%
</td>
</tr>