DiffPage.init: Enforce a valid diff mode

Bug: T173400
Change-Id: I48b97e10fc6c6e2ca84563b58dd0bb8f42fa251f
This commit is contained in:
David Lynch 2018-02-22 11:48:37 -06:00
parent 3d93d195c7
commit abe3d0a4a5

View file

@ -13,6 +13,11 @@
conf = mw.config.get( 'wgVisualEditorConfig' ),
pluginModules = conf.pluginModules.filter( mw.loader.getState );
if ( mode !== 'visual' ) {
// Enforce a valid mode, to avoid visual glitches in button-selection.
mode = 'source';
}
function onReviewModeButtonSelectSelect( item ) {
var modulePromise, progress, oldPageName, newPageName,
$revSlider = $( '.mw-revslider-container' ),