mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-27 17:10:19 +00:00
Callback should only be run after completion of API save request
Bug: T357212 Change-Id: Icee40b8f9b642e516583998f98cf0072a9e37dee
This commit is contained in:
parent
1637b2bbdf
commit
2b4b256d4e
|
@ -56,8 +56,9 @@ function toggleDocClassAndSave( featureName, value, config ) {
|
|||
// Ideally this should be taken care of via a single core helper function.
|
||||
mw.util.debounce( function () {
|
||||
api = api || new mw.Api();
|
||||
api.saveOption( pref.preferenceKey, value );
|
||||
callback();
|
||||
api.saveOption( pref.preferenceKey, value ).then( () => {
|
||||
callback();
|
||||
} );
|
||||
}, 100 )();
|
||||
// END FIXME.
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@wikimedia/mediawiki.skins.clientpreferences",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"private": false,
|
||||
"main": "clientPreferences.js",
|
||||
"author": "Wikimedia Foundation",
|
||||
|
|
Loading…
Reference in a new issue