Skip to content

Commit

Permalink
Allow to use triggersEnter in Group without Array
Browse files Browse the repository at this point in the history
 - Allow to use triggersEnter in Group without Array, see [PR
kadirahq#659](kadirahq#659)
  • Loading branch information
dr-dimitru committed Feb 23, 2017
1 parent 333cdf8 commit a2e1f3a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions client/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ Group = function(router, options = {}, parent) {
this.name = options.name;
this.options = options;

this._triggersEnter = options.triggersEnter || [];
this._triggersExit = options.triggersExit || [];
this._triggersEnter = [];
if (options.triggersEnter) {
this._triggersEnter.concat(options.triggersEnter);
}
this._triggersExit = [];
if (options._triggersExit) {
this._triggersExit.concat(options._triggersExit);
}
this._subscriptions = options.subscriptions || Function.prototype;

this.parent = parent;
Expand Down

0 comments on commit a2e1f3a

Please sign in to comment.