jenkins-bot has submitted this change and it was merged. Change subject: Don't try to read a file to make thumbnails if there's none ......................................................................
Don't try to read a file to make thumbnails if there's none This is apparently sometimes called if the upload is invalid (e.g. unacceptable file extension) and this.file is not set up. This probably shouldn't be happening, but let's just not throw exceptions. Follow-up to 2b60bbbe1e19b5c6ba63e97e5749d34ceb10d0c6. Change-Id: I30c6263640456ad7ec8e579a03c0a84668272fd4 (cherry picked from commit b7232f996bd876d0450ad05db0310cf4cffd187f) --- M resources/mw.UploadWizardUpload.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mw.UploadWizardUpload.js b/resources/mw.UploadWizardUpload.js index 3b74e52..4e2c874 100644 --- a/resources/mw.UploadWizardUpload.js +++ b/resources/mw.UploadWizardUpload.js @@ -518,7 +518,7 @@ var binReader, deferred = $.Deferred(), upload = this; - if ( this.file.type === 'image/jpeg' ) { + if ( this.file && this.file.type === 'image/jpeg' ) { binReader = new FileReader(); binReader.onload = function () { var binStr, arr, i, meta; -- To view, visit https://gerrit.wikimedia.org/r/279277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30c6263640456ad7ec8e579a03c0a84668272fd4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: wmf/1.27.0-wmf.18 Gerrit-Owner: Bartosz DziewoĆski <matma....@gmail.com> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits