diff --git a/resources/js/ext.uls.compactlinks.js b/resources/js/ext.uls.compactlinks.js index 7a10a666..122cd317 100644 --- a/resources/js/ext.uls.compactlinks.js +++ b/resources/js/ext.uls.compactlinks.js @@ -329,11 +329,9 @@ */ CompactInterlanguageList.prototype.getLangsWithBadges = function () { return Array.prototype.map.call( - document.querySelectorAll( '#p-lang [class*="badge"]' ), + document.querySelectorAll( '#p-lang [class*="badge"] a.interlanguage-link-target' ), function ( el ) { - return mw.uls.convertMediaWikiLanguageCodeToULS( - el.querySelector( '.interlanguage-link-target' ).lang - ); + return mw.uls.convertMediaWikiLanguageCodeToULS( el.lang ); } ); };