From c6dbdc92ea0fbced10043835771defb9fc2d95c2 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Sat, 21 Feb 2015 02:41:33 +0000 Subject: [PATCH] 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 --- modules/ve-mw/init/ve.init.mw.trackSubscriber.js | 5 +++++ 1 file changed, 5 insertions(+) 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();