@kevisual/query 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -239,6 +239,7 @@ class Query {
239
239
  const headers = { ...this.headers, ...options?.headers };
240
240
  const adapter = options?.adapter || this.adapter;
241
241
  const beforeRequest = options?.beforeRequest || this.beforeRequest;
242
+ const afterResponse = options?.afterResponse || this.afterResponse;
242
243
  const timeout = options?.timeout || this.timeout;
243
244
  const req = {
244
245
  url: url,
@@ -251,8 +252,8 @@ class Query {
251
252
  }
252
253
  return adapter(req).then(async (res) => {
253
254
  res.success = res.code === 200;
254
- if (options?.afterResponse) {
255
- return await options.afterResponse(res);
255
+ if (afterResponse) {
256
+ return await afterResponse(res);
256
257
  }
257
258
  return res;
258
259
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevisual/query",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",