Skip to content

Commit

Permalink
[core-rest-pipeline] await prepareFormData() (#23858)
Browse files Browse the repository at this point in the history
We should wait for the Promise to resolve
  • Loading branch information
jeremymeng committed Nov 23, 2022
1 parent fbb61b2 commit 565acec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sdk/core/core-rest-pipeline/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugs Fixed

- Fix an issue in `FormDataPolicy` where we are not waiting for `prepareFormData()` to complete [PR #23858](https://github.com/Azure/azure-sdk-for-js/pull/23858)

### Other Changes

## 1.10.0 (2022-11-03)
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-rest-pipeline/src/policies/formDataPolicy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function formDataPolicy(): PipelinePolicy {
request.body = wwwFormUrlEncode(request.formData);
request.formData = undefined;
} else {
prepareFormData(request.formData, request);
await prepareFormData(request.formData, request);
}
}
return next(request);
Expand Down

0 comments on commit 565acec

Please sign in to comment.