minor cleanup

This commit is contained in:
Dave Horton
2022-08-01 15:10:23 +01:00
parent ffa006225b
commit cb6817449d
3 changed files with 19 additions and 6 deletions

View File

@@ -127,7 +127,7 @@ class HttpRequestor extends BaseRequestor {
err.statusCode = statusCode;
throw err;
}
if (headers['content-type'].includes('application/json')) {
if (headers['content-type']?.includes('application/json')) {
buf = await body.json();
}
if (newClient) newClient.close();