Merge "JavaScriptMinifier: Fix bad state after ternary in object literal"
[lhc/web/wiklou.git] / resources / src / mediawiki.jqueryMsg / mediawiki.jqueryMsg.js
index 4f9e43a..b7fd6fd 100644 (file)
@@ -1,3 +1,4 @@
+/* eslint-disable no-restricted-properties */
 /*!
 * Experimental advanced wikitext parser-emitter.
 * See: https://www.mediawiki.org/wiki/Extension:UploadWizard/MessageParser for docs
@@ -20,7 +21,7 @@
                        },
                        // Whitelist for allowed HTML elements in wikitext.
                        // Self-closing tags are not currently supported.
-                       // Can be populated via setPrivateData().
+                       // Can be populated via setParserDefaults().
                        allowedHtmlElements: [],
                        // Key tag name, value allowed attributes for that tag.
                        // See Sanitizer::setupAttributeWhitelist
                getAst: function ( key ) {
                        var wikiText;
 
-                       if ( !this.astCache.hasOwnProperty( key ) ) {
+                       if ( !Object.prototype.hasOwnProperty.call( this.astCache, key ) ) {
                                wikiText = this.settings.messages.get( key );
                                if ( typeof wikiText !== 'string' ) {
                                        wikiText = '⧼' + key + '⧽';
                        return oldParser.apply( this );
                }
 
-               if ( !this.map.hasOwnProperty( this.format ) ) {
+               if ( !Object.prototype.hasOwnProperty.call( this.map, this.format ) ) {
                        this.map[ this.format ] = mw.jqueryMsg.getMessageFunction( {
                                messages: this.map,
                                // For format 'escaped', escaping part is handled by mediawiki.js