mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-15 03:23:45 +00:00
Merge "Do not try to save options for anonymous user"
This commit is contained in:
commit
52ef9085a9
|
@ -294,6 +294,10 @@
|
|||
},
|
||||
setCodeEditorPreference: function ( prefValue ) {
|
||||
var api = new mw.Api();
|
||||
// Do not try to save options for anonymous user
|
||||
if ( mw.user.isAnon() ) {
|
||||
return;
|
||||
}
|
||||
api.postWithToken( 'options', {
|
||||
action: 'options',
|
||||
optionname: 'usecodeeditor',
|
||||
|
|
Loading…
Reference in a new issue