1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-14 23:30:05 +02:00

fix(portal-api): handle connection error

This commit is contained in:
Sérgio Ramos 2017-09-13 10:39:12 +01:00
parent a58be6be37
commit 9eda12e75d

View File

@ -159,6 +159,10 @@ class Data extends EventEmitter {
} }
this._db._exists((err, exists) => { this._db._exists((err, exists) => {
if (err) {
return cb(err);
}
if (exists) { if (exists) {
const tables = this._db._normalizeTables(internals.tables); const tables = this._db._normalizeTables(internals.tables);
this._db.table(tables); this._db.table(tables);