不要怂,就是干,撸起袖子干!

Commit ea30ef61 by Jan Aagaard Meier

Merge pull request #3042 from seegno-forks/bugfix/assignment-to-read-only-property

Fix assignment to read only property on `getDAO()`
2 parents d9aa39ab 46211dcc
Showing with 3 additions and 2 deletions
......@@ -25,8 +25,9 @@ module.exports = (function() {
};
ModelManager.prototype.getDAO = function(daoName, options) {
options = options || {};
options.attribute = options.attribute || 'name';
options = _.defaults(options || {}, {
attribute: 'name'
});
var dao = this.daos.filter(function(dao) {
return dao[options.attribute] === daoName;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!