Skip to content

Commit

Permalink
[#125] Fix error in dashboard when dashboard artifact lists are empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
kostobog committed Jan 2, 2024
1 parent 9fed0ee commit 53f3908
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const DashboardFailureModesTableList = () => {
return (
<React.Fragment>
<ImageList className={classes.gridList} cols={6}>
{tables.map((mode) => {
{tables.filter(m => !!m && !!m.iri).map((mode) => {
const routePath = ROUTES.FMEA + extractFragment(mode.iri);
return (
<ImageListItem key={mode.iri} className={classes.gridListTile}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const DashboardFaultTreeList = () => {
return (
<React.Fragment>
<ImageList className={classes.gridList} cols={6}>
{faultTrees.map((tree) => {
{faultTrees.filter(f => !!f && !!f.iri).map((tree) => {
const routePath = ROUTES.FTA + extractFragment(tree.iri);
return (
<ImageListItem key={tree.iri} className={classes.gridListTile}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const DashboardSystemList = () => {
return (
<React.Fragment>
<ImageList className={classes.gridList} cols={6}>
{systems.map((system) => {
{systems.filter(s => !!s && !!s.iri).map((system) => {
const routePath = ROUTES.SYSTEM + extractFragment(system.iri);
return (
<ImageListItem key={system.iri} className={classes.gridListTile}>
Expand Down

0 comments on commit 53f3908

Please sign in to comment.