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 @@ -160,7 +160,7 @@ export async function fetch<T>(url: URL, options: RequestInit) {
160160 ok : response . statusCode
161161 ? response . statusCode >= 200 && response . statusCode < 300
162162 : false ,
163- buffer : ( ) => Promise . resolve ( response . body ) ,
163+ buffer : ( ) => response . body ,
164164 json : ( ) => handleJson < T > ( contentType , response . body ) ,
165165 text : ( ) => handleText ( contentType , response . body ) ,
166166 multipart : ( ) => handleMultipart ( contentType , response . body ) ,
@@ -172,7 +172,7 @@ export async function fetch<T>(url: URL, options: RequestInit) {
172172 ok : false ,
173173 status : undefined ,
174174 headers : { } ,
175- buffer : ( ) => Promise . resolve ( Buffer . from ( '' ) ) ,
175+ buffer : ( ) => Buffer . from ( '' ) ,
176176 json : ( ) => Promise . resolve ( null ) ,
177177 text : ( ) =>
178178 Promise . resolve ( err instanceof Error ? err . message : String ( err ) ) ,
You can’t perform that action at this time.
0 commit comments