Skip to content

Commit

Permalink
fix: make ctx.model or app.model configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Aug 20, 2018
1 parent 63a2567 commit a708411
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = app => {
Object.defineProperty(app, config.delegate, {
value: sequelize,
writable: false,
configurable: false,
configurable: true,
});

const DELEGATE = Symbol(`context#sequelize_${config.delegate}`);
Expand All @@ -69,7 +69,7 @@ module.exports = app => {
if (!this[DELEGATE]) this[DELEGATE] = Object.create(app[config.delegate]);
return this[DELEGATE];
},
configurable: false,
configurable: true,
});

const modelDir = path.join(app.baseDir, 'app', config.baseDir);
Expand Down

0 comments on commit a708411

Please sign in to comment.