Merge "ve.init.mw.DesktopArticleTarget.init: Make switching to VE for new pages work"

This commit is contained in:
Alex Monk 2015-11-09 22:42:34 +00:00 committed by Gerrit Code Review
commit 5f162522eb

View file

@ -529,7 +529,9 @@
},
activateVe: function () {
var wikitextModified = $( '#wpTextbox1' ).val() !== initialWikitext;
var
wikitext = $( '#wpTextbox1' ).val(),
wikitextModified = wikitext !== initialWikitext;
if (
mw.config.get( 'wgAction' ) === 'submit' ||
@ -556,8 +558,10 @@
} );
} );
} );
} else {
} else if ( wikitext ) {
activatePageTarget();
} else {
location.href = veEditUri;
}
},