Skip to content

Commit

Permalink
fix: map at the end to add the group (so it infers the type correctly)
Browse files Browse the repository at this point in the history
  • Loading branch information
Looskie committed Oct 3, 2023
1 parent c4749ee commit 4400169
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/sdks/ignite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,10 @@ export const ignite = sdk(client => {
return acc;
}, {} as Record<Group['id'], Group>);

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,
}));
},

/**
Expand Down

0 comments on commit 4400169

Please sign in to comment.