jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405557 )

Change subject: mediawiki.special.upload: trim nameToCheck
......................................................................


mediawiki.special.upload: trim nameToCheck

The API ignores titles consists only on spaces and returns a response
without a "query" key.

Bug: T185400
Change-Id: Ia365f6660c0da0138a9035aad8dfcda38fab7733
---
M resources/src/mediawiki.special/mediawiki.special.upload.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js 
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 9bf6255..06cb2d8 100644
--- a/resources/src/mediawiki.special/mediawiki.special.upload.js
+++ b/resources/src/mediawiki.special/mediawiki.special.upload.js
@@ -61,7 +61,7 @@
 
                timeout: function () {
                        var $spinnerDestCheck, title;
-                       if ( !ajaxUploadDestCheck || this.nameToCheck === '' ) {
+                       if ( !ajaxUploadDestCheck || this.nameToCheck.trim() 
=== '' ) {
                                return;
                        }
                        $spinnerDestCheck = $.createSpinner().insertAfter( 
'#wpDestFile' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia365f6660c0da0138a9035aad8dfcda38fab7733
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix <foma...@googlemail.com>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Fomafix <foma...@googlemail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to