[Polyfill > Request] Fix false erroring with valid responses

This commit is contained in:
Ducko 2021-12-24 21:40:40 +00:00
parent 0c7705f36a
commit 0b532c8d6e
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ const request = (options, callback) => { // Main function
const listeners = {};
nodeReq(options).then(async (res) => { // No error handling because yes
const isError = !res.agent;
const isError = !res.statusCode;
if (isError) {
listeners['error']?.(res);