mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "Fix "null is not a string" error in event logging code"
This commit is contained in:
commit
52c155f43f
|
@ -392,8 +392,10 @@ ve.ui.MWTemplateDialog.prototype.getActionProcess = function ( action ) {
|
||||||
}
|
}
|
||||||
var parts = dialog.transclusionModel.getParts();
|
var parts = dialog.transclusionModel.getParts();
|
||||||
for ( var i = 0; i < parts.length; i++ ) {
|
for ( var i = 0; i < parts.length; i++ ) {
|
||||||
if ( parts[ i ].getTitle ) {
|
// Only {@see ve.dm.MWTemplateModel} have a title
|
||||||
templateEvent.template_names.push( parts[ i ].getTitle() );
|
var title = parts[ i ].getTitle && parts[ i ].getTitle();
|
||||||
|
if ( title ) {
|
||||||
|
templateEvent.template_names.push( title );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mw.track( 'event.VisualEditorTemplateDialogUse', templateEvent );
|
mw.track( 'event.VisualEditorTemplateDialogUse', templateEvent );
|
||||||
|
|
Loading…
Reference in a new issue