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

Change subject: Skip when there are no more uploads
......................................................................


Skip when there are no more uploads

An earlier patch removed part of the first `if`, causing
this else now not to be fired in conditions it originally
used to.

Change-Id: I369ee2677fe8741c019e87c34772563100336f22
---
M resources/controller/uw.controller.Details.js
1 file changed, 8 insertions(+), 5 deletions(-)

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



diff --git a/resources/controller/uw.controller.Details.js 
b/resources/controller/uw.controller.Details.js
index 2631a37..0fb1d98 100644
--- a/resources/controller/uw.controller.Details.js
+++ b/resources/controller/uw.controller.Details.js
@@ -427,16 +427,19 @@
         */
        uw.controller.Details.prototype.removeUpload = function ( upload ) {
                this.queue.removeItem( upload );
-               this.removeCopyMetadataFeature();
 
+               if ( this.uploads.length === 0 ) {
+                       // If we have no more uploads, go to the "Upload" step. 
(This will go to "Thanks" step,
+                       // which will skip itself in moveTo() because there are 
no uploads left.)
+                       this.moveNext();
+                       return;
+               }
+
+               this.removeCopyMetadataFeature();
                // Make sure we still have more multiple uploads adding the
                // copy feature again
                if ( this.config.copyMetadataFeature ) {
                        this.addCopyMetadataFeature( this.uploads );
-               } else if ( this.uploads.length === 0 ) {
-                       // If we have no more uploads, go to the "Upload" step. 
(This will go to "Thanks" step,
-                       // which will skip itself in moveTo() because there are 
no uploads left.)
-                       this.moveNext();
                }
        };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I369ee2677fe8741c019e87c34772563100336f22
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to