From 4400169d3ca98e3c69c88d89afa97219b34afb24 Mon Sep 17 00:00:00 2001 From: Cody Miller Date: Mon, 2 Oct 2023 20:25:10 -0400 Subject: [PATCH] fix: map at the end to add the group (so it infers the type correctly) --- src/sdks/ignite.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/sdks/ignite.ts b/src/sdks/ignite.ts index c1ca0e34..ec3d532e 100644 --- a/src/sdks/ignite.ts +++ b/src/sdks/ignite.ts @@ -557,14 +557,10 @@ export const ignite = sdk(client => { return acc; }, {} as Record); - return deployments - .map(deployment => ({ - ...deployment, - group: deployment.group_id - ? groupRecord[deployment.group_id] - : null, - })) - .map(Deployments.from); + return deployments.map(Deployments.from).map(deployment => ({ + ...deployment, + group: deployment.group_id ? groupRecord[deployment.group_id] : null, + })); }, /**