Merge "resources: Strip '$' and 'mw' from file closures"
[lhc/web/wiklou.git] / resources / src / mediawiki.api / upload.js
index 29bd59a..1785ab3 100644 (file)
@@ -4,7 +4,7 @@
  * @class mw.Api.plugin.upload
  * @singleton
  */
-( function ( mw, $ ) {
+( function () {
        var nonce = 0,
                fieldsAllowed = {
                        stash: true,
@@ -40,9 +40,7 @@
        function getFirstKey( obj ) {
                var key;
                for ( key in obj ) {
-                       if ( obj.hasOwnProperty( key ) ) {
-                               return key;
-                       }
+                       return key;
                }
        }
 
 
                        file.name = 'file';
 
+                       // eslint-disable-next-line no-restricted-properties
                        $.each( data, function ( key, val ) {
                                $form.append( getHiddenInput( key, val ) );
                        } );
         * @class mw.Api
         * @mixins mw.Api.plugin.upload
         */
-}( mediaWiki, jQuery ) );
+}() );