Skip to content

Commit

Permalink
fix cached required data files
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmattheussen committed Aug 23, 2016
1 parent cc897a9 commit 212f9c1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/loadData.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ module.exports = function(dir) {
var name = path.basename(dataFiles[i], ext);
var data;

if (ext === '.json') {
data = require(dataFiles[i])
}
else if (ext === '.js') {
data = require(dataFiles[i])
if (ext === '.json' || ext === '.js') {
data = JSON.parse(fs.readFileSync(dataFiles[i]));
}
else if (ext === '.yml') {
data = yaml.safeLoad(fs.readFileSync(dataFiles[i]));
Expand Down

0 comments on commit 212f9c1

Please sign in to comment.