ve.ui.MWCitationDialog: Fix condition for enabling insert/apply action

The method #hasUsefulParameter has been accidentally made to always
return false in fdde5b71af.

Bug: T210686
Change-Id: I215924c2f693842abd8026404d17c725192272c3
This commit is contained in:
Bartosz Dziewoński 2018-11-29 05:00:20 +01:00
parent 57aeb852ae
commit 7f6ae77b3c

View file

@ -146,8 +146,7 @@ ve.ui.MWCitationDialog.prototype.onAddParameterBeforeLoad = function ( page ) {
* @return {boolean} * @return {boolean}
*/ */
ve.ui.MWCitationDialog.prototype.hasUsefulParameter = function () { ve.ui.MWCitationDialog.prototype.hasUsefulParameter = function () {
var name, page, var name, page;
foundUseful = false;
for ( name in this.bookletLayout.pages ) { for ( name in this.bookletLayout.pages ) {
page = this.bookletLayout.pages[ name ]; page = this.bookletLayout.pages[ name ];
@ -155,11 +154,10 @@ ve.ui.MWCitationDialog.prototype.hasUsefulParameter = function () {
page instanceof ve.ui.MWParameterPage && page instanceof ve.ui.MWParameterPage &&
( !page.preLoad || page.valueInput.getValue() !== '' ) ( !page.preLoad || page.valueInput.getValue() !== '' )
) { ) {
foundUseful = true; return true;
return false;
} }
} }
return foundUseful; return false;
}; };
/** /**