From 873116e5df1f1a445c1213132cfc109e02dc9e90 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Fri, 11 Jun 2021 12:37:54 +0200 Subject: [PATCH] Fix a react warning in `` `entityRef` should only be passed conditionally if component is present, otherwise React logs a warning/error to console. Signed-off-by: Oliver Sand --- .changeset/nice-spoons-try.md | 5 +++++ .../EntityListComponent/EntityListComponent.tsx | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .changeset/nice-spoons-try.md diff --git a/.changeset/nice-spoons-try.md b/.changeset/nice-spoons-try.md new file mode 100644 index 0000000000..c0992fa05e --- /dev/null +++ b/.changeset/nice-spoons-try.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-import': patch +--- + +Fix a react warning in ``. diff --git a/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx b/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx index bdeb483df4..64290d223e 100644 --- a/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx +++ b/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx @@ -146,11 +146,15 @@ export const EntityListComponent = ({ {sortEntities(r.entities).map(entity => ( {getEntityIcon(entity)}