diff --git a/invokeai/frontend/web/src/features/nodes/store/util/getCollectItemType.test.ts b/invokeai/frontend/web/src/features/nodes/store/util/getCollectItemType.test.ts index 93c63b6f41..7f0a96bf33 100644 --- a/invokeai/frontend/web/src/features/nodes/store/util/getCollectItemType.test.ts +++ b/invokeai/frontend/web/src/features/nodes/store/util/getCollectItemType.test.ts @@ -13,4 +13,10 @@ describe(getCollectItemType.name, () => { const result = getCollectItemType(templates, nodes, edges, n2.id); expect(result).toEqual({ name: 'IntegerField', isCollection: false, isCollectionOrScalar: false }); }); + it('should return null if the collect node does not have any connections', () => { + const n1 = buildInvocationNode(position, collect); + const nodes = [n1]; + const result = getCollectItemType(templates, nodes, [], n1.id); + expect(result).toBeNull(); + }); });