diff --git a/src/apps/material-grid/MaterialGrid.tsx b/src/apps/material-grid/MaterialGrid.tsx index 3aa4cc5b73..8f5f741341 100644 --- a/src/apps/material-grid/MaterialGrid.tsx +++ b/src/apps/material-grid/MaterialGrid.tsx @@ -59,6 +59,12 @@ const MaterialGrid: React.FC = ({ setShowAllMaterials(!showAllMaterials); } + if (!materials.length) { + // eslint-disable-next-line no-console + console.warn(`No materials to show for MaterialGrid: ${title}`); + return null; + } + const titleClasses = clsx("material-grid__title", { "material-grid__title--no-description": !description });