Skip to content

Commit

Permalink
fix(core): Freeze request after emitting afterResponse.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmit committed Jun 4, 2018
1 parent 1f1cd9b commit 66a2b64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@pollyjs/core/src/-private/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ export default class PollyRequest {

this.didRespond = true;

freeze(this);

// Trigger the `afterResponse` event
await this._trigger('afterResponse', this.response);

freeze(this);
}

async serializeBody() {
Expand Down

0 comments on commit 66a2b64

Please sign in to comment.