Skip to content

Commit

Permalink
fix: request plugin data adaptor error
Browse files Browse the repository at this point in the history
  • Loading branch information
winixt committed Mar 12, 2021
1 parent dedd607 commit 3940f23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fes-plugin-request/src/template/resDataAdaptor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { isFunction, isObject, isString } from './helpers';

export default async ({ response, responseDataAdaptor }, next) => {
if (isFunction(responseDataAdaptor) && (isObject(response.data) || isString(response.data))) {
if (isFunction(responseDataAdaptor) && response && (isObject(response.data) || isString(response.data))) {
response.data = responseDataAdaptor(response.data);
}
await next();
Expand Down

0 comments on commit 3940f23

Please sign in to comment.