From 27e6679f3d8e7d84641f399ef90cc973638c4925 Mon Sep 17 00:00:00 2001 From: paulfalgout Date: Mon, 29 Jun 2015 21:04:24 -0500 Subject: [PATCH] Remove unused triggerMethod optimization This optimization of `triggerMethod` was previously used in `Controller`, but are now gone. Seeing as we have some custom overrides for `triggerMethod` in `AbstractView` it may be more reasonable to just not worry about it. --- src/trigger-method.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/trigger-method.js b/src/trigger-method.js index 2e8856ad99..49ab214b1b 100644 --- a/src/trigger-method.js +++ b/src/trigger-method.js @@ -33,11 +33,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(_.drop(args, 0))); - } else { - context.trigger(event); - } + context.trigger.apply(context, noEventArg ? args : [event].concat(_.drop(args, 0))); } return result;