catalog-react: fix orphan query

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2023-10-12 13:25:47 +02:00
parent 0aa3cecddf
commit 2dd206a2fd
+4 -1
View File
@@ -293,7 +293,10 @@ export class EntityOrphanFilter implements EntityFilter {
constructor(readonly value: boolean) {}
getCatalogFilters(): Record<string, string | string[]> {
return { 'metadata.annotations.backstage.io/orphan': String(this.value) };
if (this.value) {
return { 'metadata.annotations.backstage.io/orphan': String(this.value) };
}
return {};
}
filterEntity(entity: Entity): boolean {