Skip user setting for unnamed users

Bug: T329771
Change-Id: I0066c2411bf12fedb1e29cde8306b107c3ab95ba
This commit is contained in:
WMDE-Fisch 2023-05-20 15:36:29 +03:00
parent ba64a52368
commit 6744545c61

View file

@ -74,7 +74,7 @@
function setCodeEditorPreference( prefValue ) {
useCodeMirror = prefValue; // Save state for function updateToolbarButton()
if ( mw.user.isAnon() ) { // Skip it for anon users
if ( !mw.user.isNamed() ) { // Skip it for unnamed users
return;
}
api.saveOption( 'usecodemirror', prefValue ? 1 : 0 );