Merge "Fix sessionfailure i18n message during authentication"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.CategoryCapsuleItemWidget.js
index 42ef1ac..17da7d8 100644 (file)
@@ -6,6 +6,8 @@
  */
 ( function ( $, mw ) {
 
+       var hasOwn = Object.prototype.hasOwnProperty;
+
        /**
         * @class mw.widgets.PageExistenceCache
         * @private
                queue = this.existenceCheckQueue;
                this.existenceCheckQueue = {};
                titles = Object.keys( queue ).filter( function ( title ) {
-                       if ( cache.existenceCache.hasOwnProperty( title ) ) {
+                       if ( hasOwn.call( cache.existenceCache, title ) ) {
                                queue[ title ].resolve( cache.existenceCache[ title ] );
                        }
-                       return !cache.existenceCache.hasOwnProperty( title );
+                       return !hasOwn.call( cache.existenceCache, title );
                } );
                if ( !titles.length ) {
                        return;
@@ -63,7 +65,7 @@
                        } );
                        titles.forEach( function ( title ) {
                                var normalizedTitle = title;
-                               while ( normalized[ normalizedTitle ] ) {
+                               while ( hasOwn.call( normalized, normalizedTitle ) ) {
                                        normalizedTitle = normalized[ normalizedTitle ];
                                }
                                cache.existenceCache[ title ] = pages[ normalizedTitle ];
@@ -81,7 +83,7 @@
         */
        PageExistenceCache.prototype.checkPageExistence = function ( title ) {
                var key = title.getPrefixedText();
-               if ( !this.existenceCheckQueue[ key ] ) {
+               if ( !hasOwn.call( this.existenceCheckQueue, key ) ) {
                        this.existenceCheckQueue[ key ] = $.Deferred();
                }
                this.processExistenceCheckQueueDebounced();