Skip to content

armgit / umami

Public Imported from GitHub
0

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.

Apply suggestion from @greptile-apps[bot]

Mike Cao4fe4bb99b718
diff --git a/src/components/input/DownloadButton.tsx b/src/components/input/DownloadButton.tsx
index 690985011..b9e2a5f63 100644
--- a/src/components/input/DownloadButton.tsx
+++ b/src/components/input/DownloadButton.tsx
@@ -14,9 +14,9 @@ export function DownloadButton({
const { formatMessage, labels } = useMessages();
const handleClick = async () => {
- if (!data || data.length === 0) {
- return;
- }
+ const handleClick = async () => {
+ downloadCsv(`${filename}.csv`, Papa.unparse(data));
+ };
downloadCsv(`${filename}.csv`, Papa.unparse(data));
};