diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js index 923c5dabfc..0b1fcbffd6 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js @@ -165,6 +165,10 @@ ve.ui.MWTransclusionDialog.prototype.onReplacePart = function ( removed, added ) ve.ui.MWTransclusionDialog.super.prototype.onReplacePart.call( this, removed, added ); + if ( this.transclusionModel.getParts().length === 0 ) { + this.addParameterButton.setDisabled( true ); + } + single = this.isSingleTemplateTransclusion(); label = ve.msg( 'visualeditor-dialog-action-insert' );