fix: test was trying to remove undefined tables

This commit is contained in:
Marc-Roig 2023-05-19 10:29:42 +02:00
parent 1846541cac
commit e29fa46749
No known key found for this signature in database
GPG Key ID: FB4E2C43A0BEE249

View File

@ -371,7 +371,9 @@ module.exports = (db) => {
})
.map((dependsOnTable) => {
return srcSchema.tables.find((srcTable) => srcTable.name === dependsOnTable.name);
});
})
// In case the table is not found, filter undefined values
.filter((table) => !_.isNil(table));
removedTables.push(srcTable, ...dependencies);
}