Apply suggestion from @greptile-apps[bot]

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Mike Cao
2025-11-10 22:42:20 -08:00
committed by GitHub
parent b9e90268d1
commit 4fe4bb99b7

View File

@@ -14,9 +14,9 @@ export function DownloadButton({
const { formatMessage, labels } = useMessages(); const { formatMessage, labels } = useMessages();
const handleClick = async () => { const handleClick = async () => {
if (!data || data.length === 0) { const handleClick = async () => {
return; downloadCsv(`${filename}.csv`, Papa.unparse(data));
} };
downloadCsv(`${filename}.csv`, Papa.unparse(data)); downloadCsv(`${filename}.csv`, Papa.unparse(data));
}; };