Steps to replicate the issue (include links if applicable):
- https://en.wikipedia.org/w/api.php?action=help&modules=globalpreferences
- https://en.wikipedia.org/w/api.php?action=help&modules=globalpreferenceoverrides
What happens?:
If no value is given (not even an equals sign), e.g., preferencename|otherpreference|..., the preference will be made non-global.
What should have happened instead?:
"Global preferences cannot be removed"
Other information (browser name/version, screenshots, etc.):
api = new mw.Api() api.postWithEditToken({action:'globalpreferences',change:['userjs-test2=foo']});
(reload page)
mw.user.options.get('userjs-test2');
returns "foo"
api = new mw.Api() api.postWithEditToken({action:'globalpreferences',change:['userjs-test2']});
(reload page)
mw.user.options.get('userjs-test2');
still returns "foo"