Skip to content

Commit

Permalink
fixup! http: add asyncRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Jan 31, 2023
1 parent 2f40547 commit cab3a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/modules/k6/http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ func (c *Client) asyncRequest(method string, url goja.Value, args ...goja.Value)
req, err := c.parseRequest(method, url, body, params)
p, resolve, reject := rt.NewPromise()
if err != nil {
resp, err := c.handleParseRequestError(err)
if err != nil {
var resp *Response
if resp, err = c.handleParseRequestError(err); err != nil {
reject(err)
} else {
resolve(resp)
Expand Down

0 comments on commit cab3a4e

Please sign in to comment.