react-csv-downloader
react-csv-downloader copied to clipboard
Accept undefined or null in the data attribute, and not process the csv in these cases.
I'm passing the data to the CsvDownloader component through an async function that fetches the data remotely. However, if I got an error from the server while fetching the data, I don't have anything to return to the component, so it returns undefined, and it gives an error on the CsvDownloader component.
It would be great if it accepts undefined to mean that we don't want to process the csv.
Thank you.