diff --git a/modules/ve-mw/init/ve.init.MWVESwitchPopupWidget.js b/modules/ve-mw/init/ve.init.MWVESwitchPopupWidget.js index a2630f5d5c..a2600a0aec 100644 --- a/modules/ve-mw/init/ve.init.MWVESwitchPopupWidget.js +++ b/modules/ve-mw/init/ve.init.MWVESwitchPopupWidget.js @@ -41,7 +41,7 @@ mw.libs.ve.SwitchPopupWidget = function MWLibsVESwitchPopupWidget( mode, config showAgainCheckbox = new OO.ui.CheckboxInputWidget() .on( 'change', function ( value ) { var configValue = value ? '1' : ''; - ve.init.target.getLocalApi().saveOption( option, configValue ); + new mw.Api().saveOption( option, configValue ); mw.user.options.set( option, configValue ); } );