Skip to content

Commit

Permalink
fix: report grid item use title only if it's there
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Jul 12, 2023
1 parent 80eb529 commit 43c06d3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import axios from "axios";
import get from "lodash/get";
import Box from "@material-ui/core/Box";
import Grid from "@material-ui/core/Grid";
import useDebounce from "react-use/lib/useDebounce";
Expand Down Expand Up @@ -121,7 +122,9 @@ export default function ReportsGrid(props: {
showMenuButton={props.showMenuButton}
handleDelete={() => handleModal(index)}
handleDuplicate={() => handleDuplicate(index)}
title={data.title.length > 0 ? data.title : data.name}
title={
get(data, "title", "").length > 0 ? data.title : data.name
}
/>
<Box height={16} />
</Grid>
Expand Down

0 comments on commit 43c06d3

Please sign in to comment.