diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js b/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js index b48f2e820c..09252658c5 100644 --- a/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js +++ b/modules/ve-mw/ui/widgets/ve.ui.MWParameterSearchWidget.js @@ -12,6 +12,7 @@ * @extends OO.ui.SearchWidget * * @constructor + * @param {ve.dm.MWTemplateModel} template Template model * @param {Object} [config] Configuration options * @cfg {number|null} [limit=3] Limit on the number of initial options to show, null to show all */ @@ -173,7 +174,7 @@ ve.ui.MWParameterSearchWidget.prototype.addResults = function () { } this.results.addItems( items ); - if ( query.length ) { + if ( hasQuery ) { this.results.highlightItem( this.results.getFirstSelectableItem() ); } };