Skip to content

Commit

Permalink
Fix minor code smells, thanks jshint!
Browse files Browse the repository at this point in the history
  • Loading branch information
pritambaral committed Dec 14, 2015
1 parent 4ee3f6e commit ff3b3b0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/angular-multi-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,9 @@ angular_multi_select.directive('angularMultiSelect',

(function () {
var dupes = {};
var fn = (function(d, o, n) { return fn(o, n, d); }).bind(this, dupes);
for(_idx in obj[key]) {
var new_obj = $scope._walk(obj[key][_idx], key, (function(d, o, n) {
return fn(o, n, d);
}).bind(this, dupes));
var new_obj = $scope._walk(obj[key][_idx], key, fn);
if (new_obj !== null) {
sub.push(new_obj);
}
Expand Down Expand Up @@ -783,8 +782,8 @@ angular_multi_select.directive('angularMultiSelect',
if (typeof dupes === "undefined") return true;
var label = $scope._interpolatedItemLabel(obj);
if (dupes[label]) return false;
else return (dupes[label] = true)
}
else return (dupes[label] = true);
};

/**
* Returns true if [attrs.searchProperty} matches the search input field (latinized, fuzzy match);
Expand Down

0 comments on commit ff3b3b0

Please sign in to comment.