We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5535d16 commit aa987aeCopy full SHA for aa987ae
lib/helper/JSONResponse.js
@@ -72,10 +72,11 @@ class JSONResponse extends Helper {
72
if (!this.helpers[this.options.requestHelper]) {
73
throw new Error(`Error setting JSONResponse, helper ${this.options.requestHelper} is not enabled in config, helpers: ${Object.keys(this.helpers)}`)
74
}
75
- // connect to REST helper
+ const origOnResponse = this.helpers[this.options.requestHelper].config.onResponse;
76
this.helpers[this.options.requestHelper].config.onResponse = response => {
77
- this.response = response
78
- }
+ this.response = response;
+ if (typeof origOnResponse === 'function') origOnResponse(response);
79
+ };
80
81
82
_before() {
0 commit comments