frontend-app-api: no longer error on invalid disabled inputs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/frontend-app-api': patch
|
||||
---
|
||||
|
||||
No longer throw error on invalid input if the child is disabled.
|
||||
@@ -167,7 +167,8 @@ describe('instantiateAppNodeTree', () => {
|
||||
{
|
||||
...makeSpec(simpleExtension),
|
||||
id: 'child-node',
|
||||
attachTo: { id: 'root-node', input: 'test' },
|
||||
// Using an invalid input should not be an error when disabled
|
||||
attachTo: { id: 'root-node', input: 'invalid' },
|
||||
disabled: true,
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -176,7 +176,9 @@ export function instantiateAppNodeTree(rootNode: AppNode): void {
|
||||
}
|
||||
return [{ id: child.spec.id, instance: childInstance }];
|
||||
});
|
||||
instantiatedAttachments.set(input, instantiatedChildren);
|
||||
if (instantiatedChildren.length > 0) {
|
||||
instantiatedAttachments.set(input, instantiatedChildren);
|
||||
}
|
||||
}
|
||||
|
||||
(node as Mutable<AppNode>).instance = createAppNodeInstance({
|
||||
|
||||
Reference in New Issue
Block a user