diff --git a/src/components/download/helperFunctions.js b/src/components/download/helperFunctions.js index 969cd8dc9..3abb194b4 100644 --- a/src/components/download/helperFunctions.js +++ b/src/components/download/helperFunctions.js @@ -631,6 +631,10 @@ export const entropyTSV = (dispatch, filePrefix, entropy) => { */ export const auspiceJSON = (dispatch, datasetNames) => { const filenames = []; + if (!datasetNames.some(Boolean)) { + console.error(`Unable to fetch empty dataset names: ${JSON.stringify(datasetNames)}`); + return dispatch(errorNotification({message: "Unable to download Auspice JSON (see console for more info)"})) + } for (const datasetName of datasetNames) { if (!datasetName) continue; // e.g. no 2nd tree const filename = datasetName.replace('/', '_') + '.json';