jenkins-bot has submitted this change and it was merged.

Change subject: Fix preHandler setup
......................................................................


Fix preHandler setup

* concat does not change its arguments.  It returns a new array
* The specific pre-handler was overriding the global.

Change-Id: I30572993a62015e396b07ba0b0b38cbfdaa7e622
---
M modules/engine/components/common/flow-component-events.js
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Matthias Mullie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/engine/components/common/flow-component-events.js 
b/modules/engine/components/common/flow-component-events.js
index a86cb56..37d3620 100644
--- a/modules/engine/components/common/flow-component-events.js
+++ b/modules/engine/components/common/flow-component-events.js
@@ -884,10 +884,10 @@
 
                // Compile a list of all preHandlers to be run
                $.each( flowComponent.UI.events.globalApiPreHandlers, function( 
key, callbackArray ) {
-                       preHandlers.concat( callbackArray );
+                       Array.prototype.push.apply( preHandlers, callbackArray 
);
                } );
                if ( flowComponent.UI.events.apiPreHandlers[ handlerName ] ) {
-                       preHandlers = flowComponent.UI.events.apiPreHandlers[ 
handlerName ];
+                       Array.prototype.push.apply( preHandlers, 
flowComponent.UI.events.apiPreHandlers[ handlerName ] );
                }
 
                preHandlers = $.map( preHandlers, function ( callback ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/208071
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I30572993a62015e396b07ba0b0b38cbfdaa7e622
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to