jenkins-bot has submitted this change and it was merged.

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


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
---
M modules/ve-mw/init/ve.init.mw.trackSubscriber.js
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



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

-- 
To view, visit https://gerrit.wikimedia.org/r/192049
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I33a13abf22da0caa1282652fa1a078ffcae11e97
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to