jenkins-bot has submitted this change and it was merged.
Change subject: ProcessDialog: send an array to showErrors in failed
executeAction
......................................................................
ProcessDialog: send an array to showErrors in failed executeAction
If an action fails we may not have any set parameters. We need
to make sure that when we call showErrors we have a fallback to
an empty array.
Change-Id: I0248b47ccab35f2a9ed4ad76be9da1217bbbdb66
---
M src/dialogs/ProcessDialog.js
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/dialogs/ProcessDialog.js b/src/dialogs/ProcessDialog.js
index 2863e19..787ccbe 100644
--- a/src/dialogs/ProcessDialog.js
+++ b/src/dialogs/ProcessDialog.js
@@ -186,8 +186,11 @@
* @inheritdoc
*/
OO.ui.ProcessDialog.prototype.executeAction = function ( action ) {
+ var process = this;
OO.ui.ProcessDialog.super.prototype.executeAction.call( this, action )
- .fail( this.showErrors.bind( this ) );
+ .fail( function ( errors ) {
+ process.showErrors( errors || [] );
+ } );
};
/**
--
To view, visit https://gerrit.wikimedia.org/r/197713
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0248b47ccab35f2a9ed4ad76be9da1217bbbdb66
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits