Loading lib/rp.js +1 −3 Original line number Diff line number Diff line Loading @@ -16,15 +16,13 @@ function ownCallback(err, httpResponse, body) { } catch (e) { } } // FIXME: Access to httpResponse.statusCode could crash. if (err) { self._rp_reject({ error: err, options: self._rp_options, response: httpResponse }); } else if (self._rp_options.simple && !(/^2/.test('' + httpResponse.statusCode))) { } else if (self._rp_options.simple && _.isObject(httpResponse) && !(/^2/.test('' + httpResponse.statusCode))) { self._rp_reject({ error: body, options: self._rp_options, Loading Loading
lib/rp.js +1 −3 Original line number Diff line number Diff line Loading @@ -16,15 +16,13 @@ function ownCallback(err, httpResponse, body) { } catch (e) { } } // FIXME: Access to httpResponse.statusCode could crash. if (err) { self._rp_reject({ error: err, options: self._rp_options, response: httpResponse }); } else if (self._rp_options.simple && !(/^2/.test('' + httpResponse.statusCode))) { } else if (self._rp_options.simple && _.isObject(httpResponse) && !(/^2/.test('' + httpResponse.statusCode))) { self._rp_reject({ error: body, options: self._rp_options, Loading