Skip to content

Commit

Permalink
Call ".value()" on Lodash wrapper
Browse files Browse the repository at this point in the history
In Lodash 3+ chained methods aren't evaluated until ".value()" is called; see https://github.com/lodash/lodash/wiki/Changelog#compatibility-warnings
  • Loading branch information
sgress454 committed Jan 9, 2016
1 parent 0262e31 commit 1f71e14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hooks/blueprints/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ module.exports = function(sails) {

_bindRoute( _getAssocRoute('post %s/:parentid/%s/:id?'), 'add', opts );
_bindRoute( _getAssocRoute('delete %s/:parentid/%s/:id?'), 'remove', opts );
});
}).value();

// and populate for both `collection` and `model` associations
_(Model.associations).forEach(function (association) {
Expand All @@ -384,7 +384,7 @@ module.exports = function(sails) {
sails.log.silly('Binding RESTful association blueprint `'+alias+'` for',controllerId);

_bindRoute( _getAssocRoute('get %s/:parentid/%s/:id?'), 'populate', opts );
});
}).value();
}
}
});
Expand Down

0 comments on commit 1f71e14

Please sign in to comment.