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

Change subject: Make ve.ui.Sequence#execute return false if the command is 
missing
......................................................................


Make ve.ui.Sequence#execute return false if the command is missing

Bug: T106060
Change-Id: If4b466865f12a6b256c85b9a23d29a51c5125910
---
M src/ui/ve.ui.Sequence.js
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Catrope: Looks good to me, but someone else must approve
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/ui/ve.ui.Sequence.js b/src/ui/ve.ui.Sequence.js
index 9721fc4..fe3f428 100644
--- a/src/ui/ve.ui.Sequence.js
+++ b/src/ui/ve.ui.Sequence.js
@@ -64,7 +64,6 @@
  *
  * @param {ve.ui.Surface} surface surface
  * @return {boolean} The command executed
- * @throws {Error} Command not found
  */
 ve.ui.Sequence.prototype.execute = function ( surface, range ) {
        var stripRange, executed, stripFragment, selection,
@@ -72,7 +71,7 @@
                command = ve.init.target.commandRegistry.lookup( 
this.getCommandName() );
 
        if ( !command ) {
-               throw new Error( 'Command not found: ' + this.getCommandName() 
) ;
+               return false;
        }
 
        if ( this.strip ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4b466865f12a6b256c85b9a23d29a51c5125910
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to