Remove jQuery.inArray usages

Replace jQuery.inArray with JS native Array.prototype.indexOf

Change-Id: I0031f0385e440a34846334d158425182542a9ac9
This commit is contained in:
petarpetkovic
2018-08-24 20:46:59 +02:00
committed by jenkins-bot
parent 54a3313e1a
commit 5a1da4dbaa
5 changed files with 11 additions and 11 deletions

View File

@@ -420,7 +420,7 @@
$( '#mw-content-text [lang]' ).each( function ( i, el ) {
var lang = convertMediaWikiLanguageCodeToULS( $( el ).attr( 'lang' ) );
if ( $.inArray( lang, languagesInText ) === -1 && $.inArray( lang, languages ) >= 0 ) {
if ( languagesInText.indexOf( lang ) === -1 && languages.indexOf( lang ) >= 0 ) {
languagesInText.push( lang );
}
} );