Skip to content

Commit 1046c29

Browse files
committed
Avoid extra JSON.stringify().
- This return value is only used where it would be immediately parsed again if a string. Just leave it as parsed data.
1 parent 799d22c commit 1046c29

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/documentLoaders/node.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ async function _fetch({url, headers, strictSSL, httpAgent, httpsAgent}) {
172172
}
173173
}
174174
const res = await httpClient.get(url, options);
175-
const body = JSON.stringify(res.data, null, 2);
176-
return {res, body};
175+
return {res, body: res.data};
177176
} catch(e) {
178177
// HTTP errors have a response in them
179178
// ky considers redirects HTTP errors

0 commit comments

Comments
 (0)