Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Commit

Permalink
Move findCacheDir call inside try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
viankakrisna authored Feb 27, 2017
1 parent 575b707 commit 513425e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ module.exports = function(input, map) {
// Read the cached information only once and if enable
if (cache === null) {
if (config.cache) {
var thunk = findCacheDir({
name: "eslint-loader",
thunk: true,
create: true,
})
cachePath = thunk("data.json") || cacheFallback
try {
var thunk = findCacheDir({
name: "eslint-loader",
thunk: true,
create: true,
})
cachePath = thunk("data.json")
cache = require(cachePath)
}
catch (e) {
Expand Down

0 comments on commit 513425e

Please sign in to comment.