From ecb792ae502dcacf168fb288ef0f2623e599eb78 Mon Sep 17 00:00:00 2001 From: kumavis Date: Sun, 11 Mar 2018 19:06:14 -0700 Subject: genStates - fix fs api calls --- development/genStates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'development') diff --git a/development/genStates.js b/development/genStates.js index 325ef71f3..d92e2bc2e 100644 --- a/development/genStates.js +++ b/development/genStates.js @@ -6,11 +6,11 @@ start().catch(console.error) async function start () { const statesPath = path.join(__dirname, 'states') - const stateFilesNames = await promisify(fs.readdirSync)(statesPath) + const stateFilesNames = await promisify(fs.readdir)(statesPath) const states = {} await Promise.all(stateFilesNames.map(async (stateFileName) => { const stateFilePath = path.join(__dirname, 'states', stateFileName) - const stateFileContent = await promisify(fs.readFileSync)(stateFilePath, 'utf8') + const stateFileContent = await promisify(fs.readFile)(stateFilePath, 'utf8') const state = JSON.parse(stateFileContent) const stateName = stateFileName.split('.')[0].replace(/-/g, ' ', 'g') states[stateName] = state -- cgit