Kaldari has submitted this change and it was merged. Change subject: (bug 39608) Check for undefined in many places ......................................................................
(bug 39608) Check for undefined in many places O_O Several bugs converged: 1. In jQuery, $.each doesn't check whether an array member exists or not. So var a = []; a[1000] = 10; $.each(a, fn); means fn will be called 1001 times. Just silly. 2. In UploadWizard, we don't splice the uploads list like sane people, we just delete items from the list. 3. In UploadWizard, we assume that all of the uploads are UWU objects, and use $.each to traverse the list. So now, I added a bunch of instances of if ( upload === undefined ) return; and threw in some checks for the upload counts. This bug is fixed now. I think we need to revisit this, at a later time, as a symptom of us doing things sooooo wrong. We could just splice items out, but it will require some other changes, so I won't deal with it now. Change-Id: I4994d2bf7c75845ac31305cf553a1c5ce1526bc0 --- M resources/mw.GroupProgressBar.js M resources/mw.UploadWizard.js M resources/mw.UploadWizardDetails.js M resources/mw.UploadWizardUpload.js 4 files changed, 76 insertions(+), 13 deletions(-) Approvals: Kaldari: Verified; Looks good to me, approved -- To view, visit https://gerrit.wikimedia.org/r/21820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4994d2bf7c75845ac31305cf553a1c5ce1526bc0 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: MarkTraceur <[email protected]> Gerrit-Reviewer: Kaldari <[email protected]> Gerrit-Reviewer: MarkTraceur <[email protected]> Gerrit-Reviewer: Matmarex <[email protected]> Gerrit-Reviewer: TheDJ <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
