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

Commit

Permalink
fixes a bug that wowa crashes if game is newly installed
Browse files Browse the repository at this point in the history
  • Loading branch information
antiwinter committed Sep 18, 2019
1 parent ac40ce9 commit eb2927b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/wowaads.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ let w = {
},

unknownDirs() {
return _.filter(
fs.readdirSync(cfg.getPath('addon')),
d => !/^\./.test(d) && !w.dirStatus(d)
)
try {
return _.filter(
fs.readdirSync(cfg.getPath('addon')),
d => !/^\./.test(d) && !w.dirStatus(d)
)
} catch(err) {
return []
}
}
}

Expand Down

0 comments on commit eb2927b

Please sign in to comment.