mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Fix for unhandled promise on fresh db startup
issue #977 - As of the addition of when/monitor/console we now get errors about unhandled promises - This fixes one which appeared when starting up without a DB
This commit is contained in:
parent
53dc1b4466
commit
b5c5d531d1
@ -54,7 +54,7 @@ function getDatabaseVersion() {
|
||||
return databaseVersion;
|
||||
});
|
||||
}
|
||||
return when.reject('Settings table does not exist');
|
||||
throw new Error('Settings table does not exist');
|
||||
});
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
}, function (err) {
|
||||
if (err === 'Settings table does not exist') {
|
||||
if (err.message || err === 'Settings table does not exist') {
|
||||
// 4. The database has not yet been created
|
||||
// Bring everything up from initial version.
|
||||
return self.migrateUpFreshDb();
|
||||
|
Loading…
Reference in New Issue
Block a user