From 5208298a67d116a36d36592632dd06a1c305facb Mon Sep 17 00:00:00 2001 From: Anatoliy Chakkaev Date: Sat, 15 Dec 2012 16:05:32 +0400 Subject: [PATCH] Fix broken yml config, closes #159 --- lib/railway.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/railway.js b/lib/railway.js index 7203b279..bc54a920 100644 --- a/lib/railway.js +++ b/lib/railway.js @@ -25,7 +25,7 @@ module.exports = function init(root) { railway.orm._schemas = []; var confFile = (root || app.root) + '/config/database'; - var config; + var config = {}; if (existsSync(confFile + '.json')) { try { @@ -41,7 +41,6 @@ module.exports = function init(root) { console.log('Could not parse config/database.yml'); throw e; } - config = {}; } // when driver name started with point - look for driver in app root (relative path) if (config.driver && config.driver.match(/^\./)) {