Skip to content

Commit

Permalink
Remove moot comments
Browse files Browse the repository at this point in the history
  • Loading branch information
szmarczak committed Apr 18, 2020
1 parent af0b147 commit 6f621fd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions source/core/index.ts
Expand Up @@ -1176,14 +1176,12 @@ export default class Request extends Duplex implements RequestEvents<Request> {
(options as unknown as NormalizedOptions).url = url;

cacheRequest.once('error', (error: Error) => {
if (error instanceof CacheableRequest.RequestError) {
// TODO: `options` should be `normalizedOptions`
reject(new RequestError(error.message, error, this));
if (error instanceof CacheableRequest.CacheError) {
reject(new CacheError(error, this));
return;
}

// TODO: `options` should be `normalizedOptions`
reject(new CacheError(error, this));
reject(error);
});
cacheRequest.once('request', resolve);
});
Expand Down

0 comments on commit 6f621fd

Please sign in to comment.