Don't try to route any events into schema.Edit if it's not actually installed

E.g. no WikimediaEvents

Bug: T88667
Change-Id: I33a13abf22da0caa1282652fa1a078ffcae11e97
This commit is contained in:
Alex Monk 2015-02-21 02:41:33 +00:00
parent 90562b1b8b
commit c6dbdc92ea

View file

@ -8,6 +8,11 @@
*/
( function () {
if ( mw.loader.getState( 'schema.Edit' ) === null ) {
// Only route any events into the Edit schema if the module is actually available.
// It won't be if EventLogging is installed but WikimediaEvents is not.
return;
}
var timing = {},
editingSessionId = mw.user.generateRandomSessionId();