Skip to content

Commit

Permalink
fix(db): Fix crash for real this time :)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentdesmares committed Jun 2, 2024
1 parent 30c893d commit 07519b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function initDb(_a) {
var dbConfig = _a.dbConfig, sequelizeInstance = _a.sequelizeInstance;
var basename = path_1["default"].basename(module.filename);
db = {};
if (typeof dbConfig.use_env_variable !== 'undefined' &&
if (dbConfig &&
typeof dbConfig.use_env_variable !== 'undefined' &&
dbConfig.use_env_variable &&
!sequelizeInstance) {
sequelizeInstance = new sequelize_1.Sequelize();
Expand Down

0 comments on commit 07519b0

Please sign in to comment.