Matthias Mullie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315072

Change subject: Don't show warning confirmation dialog when there are no 
warnings
......................................................................

Don't show warning confirmation dialog when there are no warnings

In JavaScript, an empty array isn't falsy...

Bug: T147659
Change-Id: Ibaace3d0c07e46c56694683facf00a0ccb2b2bfe
---
M resources/controller/uw.controller.Details.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/72/315072/1

diff --git a/resources/controller/uw.controller.Details.js 
b/resources/controller/uw.controller.Details.js
index 9b06a38..f72607f 100644
--- a/resources/controller/uw.controller.Details.js
+++ b/resources/controller/uw.controller.Details.js
@@ -214,7 +214,7 @@
                                                        return result.concat( 
warnings );
                                                }, [] );
 
-                                       if ( warnings ) {
+                                       if ( warnings.length ) {
                                                // Update warning count before 
dialog
                                                detailsController.showErrors();
                                                return 
detailsController.confirmationDialog( warnings );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaace3d0c07e46c56694683facf00a0ccb2b2bfe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: wmf/1.28.0-wmf.21
Gerrit-Owner: Matthias Mullie <mmul...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to