https://bugzilla.wikimedia.org/show_bug.cgi?id=47771

Alex Monk (Krenair) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |[email protected]

--- Comment #1 from Alex Monk (Krenair) <[email protected]> ---
So after getting through to the flickr interface on that wiki using $(
'#mwe-upwiz-upload-ctrl-flickr' ).click() and uploading a file, I see this
error:


Uncaught TypeError: Object function arrayPrototypeUniq() {
    var result = [];
    for( var i = 0; i < this.length; ++i ) {
        var current = this[i];
        if( result.indexOf( current ) == -1 ) {
            result.push( current );
        }
    }
    return result;
} has no method 'counter' 



This is because we loop through an array in updateCopyMsgs in
mw.UploadWizardDetails.js using "for ( var mx in msgs ) { var msg = msgs[mx];
}".

For most users this is fine, but both of us include Array.prototype.uniq,
Array.prototype.dups, and Array.prototype.chunk in morebits.js, which is needed
for Twinkle.

(I'm using https://en.wikipedia.org/w/index.php?title=User:AzaToth/morebits.js
while the bug creator seems to be using
https://commons.wikimedia.org/wiki/User:Maximr/morebits.js)

I'm not sure we should expect other JS to do this, but a workaround seems to be
to use $.each on the msgs array instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to