From 9770e540d088c35ec0b467fa3d2fafb60ed6797d Mon Sep 17 00:00:00 2001 From: Szymon Marczak <36894700+szmarczak@users.noreply.github.com> Date: Mon, 11 May 2020 17:13:57 +0200 Subject: [PATCH] Upgrade `cacheable-lookup` to 5.0.3 Fixes #1220 --- package.json | 2 +- source/core/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b40d1f3a4..9ac633aea 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", - "cacheable-lookup": "^4.3.0", + "cacheable-lookup": "^5.0.3", "cacheable-request": "^7.0.1", "decompress-response": "^5.0.0", "get-stream": "^5.1.0", diff --git a/source/core/index.ts b/source/core/index.ts index 355ce6ef7..0bbecf54e 100644 --- a/source/core/index.ts +++ b/source/core/index.ts @@ -788,7 +788,7 @@ export default class Request extends Duplex implements RequestEvents { // `options.dnsCache` if (options.dnsCache === true) { options.dnsCache = new CacheableLookup(); - } else if (!is.undefined(options.dnsCache) && !(options.dnsCache instanceof CacheableLookup)) { + } else if (!is.undefined(options.dnsCache) && !options.dnsCache.lookup) { throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${is(options.dnsCache)}`); }