frontend-app-api: fix for input extension data containers not being iterable at runtime

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-08-11 19:57:06 +02:00
parent 9f476d1687
commit 66c6bbcef5
@@ -92,6 +92,16 @@ function resolveInputDataContainer(
get(ref) {
return dataMap.get(ref.id);
},
*[Symbol.iterator]() {
for (const [id, value] of dataMap) {
// TODO: Would be better to be able to create a new instance using the ref here instead
yield {
$$type: '@backstage/ExtensionDataValue',
id,
value,
};
}
},
} as { node: AppNode } & ExtensionDataContainer<AnyExtensionDataRef>;
}