diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js index f8c3e47cf7..03cb1dcb6e 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js @@ -154,13 +154,20 @@ ve.ui.MWSaveDialog.prototype.swapPanel = function ( panel ) { } this.lastEditSummaryWikitext = currentEditSummaryWikitext; this.$reviewEditSummary.empty() - .parent().addClass( 'mw-ajax-loader' ); + .parent().show().addClass( 'mw-ajax-loader' ); this.editSummaryXhr = new mw.Api().post( { action: 'parse', summary: currentEditSummaryWikitext } ).done( function ( result ) { - dialog.$reviewEditSummary.html( ve.msg( 'parentheses', result.parse.parsedsummary['*'] ) ) - .parent().removeClass( 'mw-ajax-loader' ); + if ( result.parse.parsedsummary['*'] === '' ) { + dialog.$reviewEditSummary.parent().hide(); + } else { + dialog.$reviewEditSummary.html( ve.msg( 'parentheses', result.parse.parsedsummary['*'] ) ); + } + } ).fail( function () { + dialog.$reviewEditSummary.parent().hide(); + } ).always( function () { + dialog.$reviewEditSummary.parent().removeClass( 'mw-ajax-loader' ); } ); } /* falls through */