Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2023-11-02 10:21:50 +01:00
parent c8cca74b84
commit e08146d6c7
1 changed files with 2 additions and 2 deletions

View File

@ -208,14 +208,14 @@ module.exports = (_ => {
url: ""
}, null);
}).then(r => {
if (!r) return;
response = r;
if (!response) return;
response.statusCode = response.status;
if (response.headers) response.headers["content-type"] = response.headers.get("content-type");
BDFDB.TimeUtils.clear(timeoutObj);
return response.text();
}).then(body => {
if (!killed) callback(response.status != 200 ? new Error(response.statusText || "Fetch Failed") : null, response, body);
if (!killed && response) callback(response.status != 200 ? new Error(response.statusText || "Fetch Failed") : null, response, body);
});
}
};