Skip to content

Commit

Permalink
return the promise returned by then to guarantee order
Browse files Browse the repository at this point in the history
  • Loading branch information
waltjones committed Nov 29, 2022
1 parent 175a5a9 commit 905714c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/browser/telemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ Instrumenter.prototype.instrumentNetwork = function() {

// Start our handler before returning the promise. This allows resp.clone()
// to execute before other handlers touch the response.
promise.then(function (resp) {
promise = promise.then(function (resp) {
metadata.end_time_ms = _.now();
metadata.status_code = resp.status;
metadata.response_content_type = resp.headers.get('Content-Type');
Expand Down

0 comments on commit 905714c

Please sign in to comment.