Skip to content

Commit

Permalink
fix(cache): return promise to not break promise chain
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanebachelier committed Apr 24, 2016
1 parent d228174 commit 2724ee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function cache (config = {}) {
return config.readCache(req, config.log)(value)
.catch(err => {
// clean up cache if stale
config.clearOnStale && err.reason === 'cache-stale' ? config.store.removeItem(uuid).then(f) : f()
return config.clearOnStale && err.reason === 'cache-stale' ? config.store.removeItem(uuid).then(f) : f()
})
})
}
Expand Down

0 comments on commit 2724ee7

Please sign in to comment.