Skip to content

Commit 2f550ee

Browse files
committed
Fix catalog items map initialization
1 parent 7f7130e commit 2f550ee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

frontend/packages/console-shared/src/components/catalog/service/CatalogServiceProvider.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ const CatalogServiceProvider: React.FC<CatalogServiceProviderProps> = ({
140140
result[e.properties.type] = [];
141141
});
142142
catalogItems.forEach((item) => {
143-
(result[item.type] ?? []).push(item);
143+
if (!result[item.type]) {
144+
result[item.type] = [];
145+
}
146+
result[item.type].push(item);
144147
});
145148
return result;
146149
}, [catalogProviderExtensions, catalogItems]);

0 commit comments

Comments
 (0)