Skip to content
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.

Commit

Permalink
fix(cache): if metadata is missing for some odd reason, ignore the entry
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Apr 4, 2017
1 parent dd8421b commit a021a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit a021a6b

Please sign in to comment.