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

Commit 513425e

Browse files
authored
Move findCacheDir call inside try catch
1 parent 575b707 commit 513425e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ module.exports = function(input, map) {
188188
// Read the cached information only once and if enable
189189
if (cache === null) {
190190
if (config.cache) {
191-
var thunk = findCacheDir({
192-
name: "eslint-loader",
193-
thunk: true,
194-
create: true,
195-
})
196-
cachePath = thunk("data.json") || cacheFallback
197191
try {
192+
var thunk = findCacheDir({
193+
name: "eslint-loader",
194+
thunk: true,
195+
create: true,
196+
})
197+
cachePath = thunk("data.json")
198198
cache = require(cachePath)
199199
}
200200
catch (e) {

0 commit comments

Comments
 (0)