0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Merge pull request #7446 from kirrg001/fix/circular-dependency-bootup

🐛  fix circular dependency in new bootUp script
This commit is contained in:
Sebastian Gierlinger 2016-09-27 13:10:07 +02:00 committed by GitHub
commit 02c7d039d8

View file

@ -1,6 +1,6 @@
var Promise = require('bluebird'),
versioning = require('./versioning'),
migrations = require('../migration'),
populate = require('../migration/populate'),
errors = require('./../../errors');
module.exports = function bootUp() {
@ -19,7 +19,7 @@ module.exports = function bootUp() {
// We don't use .catch here, as it would catch the error from the successHandler
function errorHandler(err) {
if (err instanceof errors.DatabaseNotPopulated) {
return migrations.populate();
return populate();
}
return Promise.reject(err);