Merge "resourceloader: Simplify StringSet fallback"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.TitleWidget.js
index 2340f9c..c256f1f 100644 (file)
@@ -4,7 +4,7 @@
  * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
  * @license The MIT License (MIT); see LICENSE.txt
  */
-( function ( $, mw ) {
+( function () {
        var hasOwn = Object.prototype.hasOwnProperty;
 
        /**
                var api = this.getApi(),
                        cache = this.constructor.static.interwikiPrefixesPromiseCache,
                        key = api.defaults.ajax.url;
-               if ( !cache.hasOwnProperty( key ) ) {
+               if ( !Object.prototype.hasOwnProperty.call( cache, key ) ) {
                        cache[ key ] = api.get( {
                                action: 'query',
                                meta: 'siteinfo',
                                // Workaround T97096 by setting uselang=content
                                uselang: 'content'
                        } ).then( function ( data ) {
-                               return $.map( data.query.interwikimap, function ( interwiki ) {
+                               return data.query.interwikimap.map( function ( interwiki ) {
                                        return interwiki.prefix;
                                } );
                        } );
                return !!this.getMWTitle();
        };
 
-}( jQuery, mediaWiki ) );
+}() );