From acb2755f3355cf459e15ce7c4989c99a5643e2bd Mon Sep 17 00:00:00 2001 From: Mathieu Hofman Date: Thu, 5 Sep 2024 18:17:48 +0000 Subject: [PATCH] fixup! feat(orchestration): map flows anywhere in context --- packages/orchestration/src/facade.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/orchestration/src/facade.js b/packages/orchestration/src/facade.js index 76560ad51e9c..71a11ad430e3 100644 --- a/packages/orchestration/src/facade.js +++ b/packages/orchestration/src/facade.js @@ -116,9 +116,11 @@ export const makeOrchestrationFacade = ({ (...args) => orcFns[name](...args), ]), ); - const mapFlow = guestFn => mappedFlows.get(guestFn) || guestFn; - const mappedContext = deepMapObject(hostCtx, mapFlow); + const mappedContext = deepMapObject( + hostCtx, + val => mappedFlows.get(val) || val, + ); const orcFns = /** @type {{ [N in keyof GFM]: HostForGuest }} */ ( Object.fromEntries(