From e66d58076fac8ac92e9a3bcaa59596c6829cce5f Mon Sep 17 00:00:00 2001 From: David Lynch Date: Wed, 13 Dec 2017 11:56:35 -0600 Subject: [PATCH] trackSubscriber: data isn't required Editor-fixing caused errors on some events which don't pass data in. Introduced in 8f612fbe64. Change-Id: I5c9471e6ffe4cdda0bf5455c80ef70251690e20f --- modules/ve-mw/init/ve.init.mw.trackSubscriber.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/init/ve.init.mw.trackSubscriber.js b/modules/ve-mw/init/ve.init.mw.trackSubscriber.js index 29b75cb61a..2caa31d948 100644 --- a/modules/ve-mw/init/ve.init.mw.trackSubscriber.js +++ b/modules/ve-mw/init/ve.init.mw.trackSubscriber.js @@ -95,7 +95,7 @@ } // Convert mode=source/visual to editor name - if ( data.mode ) { + if ( data && data.mode ) { data.editor = data.mode === 'source' ? 'wikitext-2017' : 'visualeditor'; delete data.mode; }