File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export const taroAdapter = (opts: {
2525 /**
2626 * Taro.request()的默认参数,每次请求前都会合并对象
2727 */
28- requestOptions : Taro . request . Option ;
28+ requestOptions ? : Taro . request . Option ;
2929} ) : OpenapiClientAdapter => {
3030 const {
3131 returningData = ( response ) => response . data ,
@@ -49,7 +49,7 @@ export const taroAdapter = (opts: {
4949 url : baseURL + utils . uriConcatQuery ( opts . uri , opts . query ) ,
5050 method : opts . method . toUpperCase ( ) as `${Uppercase < Methods > } `,
5151 data : body ,
52- header : { ...requestOptions . header , ...opts . headers } ,
52+ header : { ...requestOptions ? .header , ...opts . headers } ,
5353 timeout : opts . timeout ,
5454 credentials,
5555 responseType : opts . responseType === 'text' ? 'text' : undefined ,
You can’t perform that action at this time.
0 commit comments