Skip to content

Commit

Permalink
Fix request.Timing
Browse files Browse the repository at this point in the history
This is a temporary fix.

When working with page.on('request') the timing values haven't yet been
received, which are part of the response object. This will need to be
fixed later when we can wait for a response while working with
page.on('request').
  • Loading branch information
ankur22 committed Jan 28, 2025
1 parent 0355dcb commit 203c763
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/js/modules/k6/browser/common/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ type resourceTiming struct {

// Timing returns the request timing information.
func (r *Request) Timing() *resourceTiming {
if r.response == nil {
return nil
}

timing := r.response.timing

return &resourceTiming{
Expand Down

0 comments on commit 203c763

Please sign in to comment.