This has been flagged by recent tests added in MediaWiki Core
Steps to replicate the issue (include links if applicable):
- Visit https://en.wikipedia.org/wiki/Spain?safemode=1
- mw.loader.getState('ext.wikimediaBadges') in console
What happens?:
The ext.wikimediaBadges module has been loaded on the page despite not being used anywhere in the page
What should have happened instead?:
The module should be loaded conditionally and only if the page has badges
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
