Skip to content

Commit

Permalink
fix: Serializing of body params correctly sequences checks before abo…
Browse files Browse the repository at this point in the history
…rting (#835)
  • Loading branch information
KenzoBenzo authored May 9, 2024
1 parent 472421c commit 094e621
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ui/app/src/api-playground/PlaygroundEndpoint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ async function serializeFormStateBody(
basePath: string | undefined,
domain: string,
): Promise<ProxyRequest.SerializableBody | undefined> {
if (shape == null || body == null || shape.type !== "formData") {
if (shape == null || body == null) {
return undefined;
}

Expand All @@ -317,6 +317,9 @@ async function serializeFormStateBody(
};
break;
case "json": {
if (shape.type !== "formData") {
return undefined;
}
const property = shape.properties.find((p) => p.key === key && p.type === "bodyProperty") as
| ResolvedFormDataRequestProperty.BodyProperty
| undefined;
Expand Down

0 comments on commit 094e621

Please sign in to comment.