Skip to content

Commit

Permalink
fix(belongsToMany): typo in relation added methods on base relation
Browse files Browse the repository at this point in the history
fix #258
  • Loading branch information
thetutlage committed Dec 12, 2017
1 parent f372a7f commit e902760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Lucid/Relations/BelongsToMany.js
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ class BelongsToMany extends BaseRelation {
* Adding all aggregate methods at once.
*/
aggregates.forEach((method) => {
BaseRelation.prototype[method] = function (expression) {
BelongsToMany.prototype[method] = function (expression) {
this._validateRead()
this._prepareAggregate()
return this.relatedQuery[method](expression)
Expand All @@ -931,7 +931,7 @@ aggregates.forEach((method) => {
* Adding all short hand aggregate methods at once.
*/
shortHandAggregates.forEach((method) => {
BaseRelation.prototype[method] = function (expression) {
BelongsToMany.prototype[method] = function (expression) {
this._validateRead()
this._selectFields()
this._prepareAggregate()
Expand Down

0 comments on commit e902760

Please sign in to comment.