From a021a6b894133a2a7fefd7c623781933b92a1a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Mon, 3 Apr 2017 21:08:46 -0700 Subject: [PATCH] fix(cache): if metadata is missing for some odd reason, ignore the entry --- cache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.js b/cache.js index d86ce2e..abcd72c 100644 --- a/cache.js +++ b/cache.js @@ -40,7 +40,7 @@ module.exports = class Cache { // matching request in the Cache object. match (req, opts) { return cacache.get.info(this._path, cacheKey(req)).then(info => { - if (info && matchDetails(req, { + if (info && info.metadata && matchDetails(req, { url: info.metadata.url, reqHeaders: new fetch.Headers(info.metadata.reqHeaders), resHeaders: new fetch.Headers(info.metadata.resHeaders),