diff --git a/modules/ve-mw/init/ve.init.mw.trackSubscriber.js b/modules/ve-mw/init/ve.init.mw.trackSubscriber.js index 3622100e74..c71c3e22b0 100644 --- a/modules/ve-mw/init/ve.init.mw.trackSubscriber.js +++ b/modules/ve-mw/init/ve.init.mw.trackSubscriber.js @@ -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();