Skip to content

Commit

Permalink
Fix regeneration script
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 18, 2018
1 parent 3b02fd1 commit 0257af4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions script/regenerate-fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ fs.readdir(join(root), function(err, files) {
return
}

config = fs.readFileSync(join(base, 'config.json'), 'utf8')
config = JSON.parse(config)
try {
config = JSON.parse(fs.readFileSync(join(base, 'config.json')))
} catch (err) {
config = {}
}

fs.readFile(join(base, 'index.html'), 'utf8', function(err, doc) {
var processor = rehype().use({settings: config})
Expand Down

0 comments on commit 0257af4

Please sign in to comment.