Skip to content

Commit

Permalink
Change _.rest multiple arg usage to drop for lodash 3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
megawac committed Feb 5, 2015
1 parent 9972733 commit 8f8c592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/module.js
Expand Up @@ -144,7 +144,7 @@ _.extend(Marionette.Module, {

// get the custom args passed in after the module definition and
// get rid of the module name and definition function
var customArgs = _.rest(arguments, 3);
var customArgs = _.drop(arguments, 3);

// Split the module names and get the number of submodules.
// i.e. an example module name of `Doge.Wow.Amaze` would
Expand Down
2 changes: 1 addition & 1 deletion src/trigger-method.js
Expand Up @@ -35,7 +35,7 @@ Marionette._triggerMethod = (function() {
// trigger the event, if a trigger method exists
if (_.isFunction(context.trigger)) {
if (noEventArg + args.length > 1) {
context.trigger.apply(context, noEventArg ? args : [event].concat(_.rest(args, 0)));
context.trigger.apply(context, noEventArg ? args : [event].concat(_.drop(args, 0)));
} else {
context.trigger(event);
}
Expand Down

0 comments on commit 8f8c592

Please sign in to comment.