Skip to content
Snippets Groups Projects
Unverified Commit 3e4bf91f authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Check for cardId being undefined (#45860)

parent a82419a2
Branches
Tags
No related merge requests found
......@@ -76,7 +76,8 @@ const getDatasetParams = ({
visualizationSettings,
}: DownloadQueryResultsOpts): DownloadQueryResultsParams => {
const cardId = question.id();
const isQuestionInStaticEmbedDashboard = dashcardId != null && token != null;
const isQuestionInStaticEmbedDashboard =
dashcardId != null && cardId != null && token != null;
// Formatting is always enabled for Excel
const format_rows = enableFormatting && type !== "xlsx" ? "true" : "false";
......@@ -89,7 +90,8 @@ const getDatasetParams = ({
};
}
const isQuestionInPublicDashboard = dashboardId != null && uuid != null;
const isQuestionInPublicDashboard =
dashboardId != null && cardId != null && uuid != null;
if (isQuestionInPublicDashboard) {
return {
method: "POST",
......@@ -101,7 +103,8 @@ const getDatasetParams = ({
};
}
const isDashboard = dashboardId != null && dashcardId != null;
const isDashboard =
dashboardId != null && dashcardId != null && cardId != null;
if (isDashboard) {
return {
method: "POST",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment