Replace deprecated function (#100)

This is to mitigate a bug that has happened in MW 1.39.1. Clicking the "Clear infobox" button caused a TypeError exception: "mw.user.getName is not a function".
This commit is contained in:
Keyacom 2023-06-05 03:11:05 +02:00 committed by GitHub
parent f5a69ef8db
commit b2cb67ad21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,7 +212,7 @@
}
clearInfobox() {
OO.ui.confirm( mw.message( 'confirmable-confirm', mw.user.getName() ).text() )
OO.ui.confirm( mw.message( 'confirmable-confirm', mw.config.get("wgUserName") ).text() )
.done( ( confirmed ) => {
if ( confirmed ) {
this.deselect();