Skip to content

Commit 2d7e98f

Browse files
author
Tomas Kirda
committed
Merge pull request devbridge#252 from dugwood/patch-1
Fix syntax for jsHint
2 parents 505485e + a6efd4e commit 2d7e98f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/jquery.autocomplete.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,7 @@
281281
topOverflow = -scrollTop + offset.top - containerHeight,
282282
bottomOverflow = scrollTop + viewPortHeight - (offset.top + height + containerHeight);
283283

284-
orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow)
285-
? 'top'
286-
: 'bottom';
284+
orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow) ? 'top' : 'bottom';
287285
}
288286

289287
if (orientation === 'top') {
@@ -388,7 +386,7 @@
388386
that.selectHint();
389387
return;
390388
}
391-
// Fall through to RETURN
389+
/* falls through */
392390
case keys.RETURN:
393391
if (that.selectedIndex === -1) {
394392
that.hide();
@@ -607,7 +605,11 @@
607605

608606
suggest: function () {
609607
if (this.suggestions.length === 0) {
610-
this.options.showNoSuggestionNotice ? this.noSuggestions() : this.hide();
608+
if (this.options.showNoSuggestionNotice) {
609+
this.noSuggestions();
610+
} else {
611+
this.hide();
612+
}
611613
return;
612614
}
613615

@@ -851,7 +853,7 @@
851853

852854
adjustScroll: function (index) {
853855
var that = this,
854-
activeItem = that.activate(index)
856+
activeItem = that.activate(index);
855857

856858
if (!activeItem) {
857859
return;

0 commit comments

Comments
 (0)