Skip to content

Commit 1d0e9a4

Browse files
committed
a bit of jshint cleanup
1 parent 16c8689 commit 1d0e9a4

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

select2.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
}
6868
};
6969

70-
nextUid=(function() { var counter=1; return function() { return counter++; }}());
70+
nextUid=(function() { var counter=1; return function() { return counter++; }; }());
7171

7272
function indexOf(value, array) {
7373
var i = 0, l = array.length, v;
@@ -518,7 +518,7 @@
518518
populate(results, 0);
519519

520520
children=container.children();
521-
if (children.length==0) {
521+
if (children.length===0) {
522522
container.html(markup.join(""));
523523
} else {
524524
$(children[children.length-1]).append(markup.join(""));
@@ -659,7 +659,7 @@
659659
width: width
660660
}
661661
if (this.opts.dropdownZIndex !== undefined) {
662-
css["z-index"] = this.opts.dropdownZIndex
662+
css["z-index"] = this.opts.dropdownZIndex;
663663
}
664664
this.dropdown.css(css);
665665
},
@@ -1038,7 +1038,7 @@
10381038
killEvent(e);
10391039
}
10401040
}));
1041-
containers.delegate(selector, "focus", function () { if (this.enabled) { containerGroup.addClass("select2-container-active"); dropdown.addClass("select2-drop-active"); }});
1041+
containers.delegate(selector, "focus", function () { if (this.enabled) { containers.addClass("select2-container-active"); dropdown.addClass("select2-drop-active"); }});
10421042
containers.delegate(selector, "blur", this.bind(function () {
10431043
if (clickingInside) return;
10441044
if (!this.opened()) this.blur();
@@ -1350,9 +1350,7 @@
13501350
clearSearch: function () {
13511351
var placeholder = this.getPlaceholder();
13521352

1353-
if (placeholder !== undefined
1354-
&& this.getVal().length === 0
1355-
&& this.search.hasClass("select2-focused") === false) {
1353+
if (placeholder !== undefined && this.getVal().length === 0 && this.search.hasClass("select2-focused") === false) {
13561354

13571355
this.search.val(placeholder).addClass("select2-default");
13581356
// stretch the search box to full width of the container so as much of the placeholder is visible as possible

0 commit comments

Comments
 (0)