Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jerem1508 committed Oct 21, 2024
1 parent 47d2a03 commit dd343ed
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ export default function ChartWrapper({ id, options, legend, renderData }) {
const sourceURL = "https://cordis.europa.eu/";
const modalId = useId();

if (displayType === "data" && !renderData) {
console.error(
"You need to provide a renderData function to display the data"
);
setDisplayType("chart");
return null;
}

return (
<section>
{graphConfig.title && (
Expand Down

0 comments on commit dd343ed

Please sign in to comment.