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 7ce575f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 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 fnd = (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, fnd);
if (new_obj !== null) {
sub.push(new_obj);
}
Expand Down Expand Up @@ -356,8 +355,9 @@ angular_multi_select.directive('angularMultiSelect',
});
$scope._walk(dst, attrs.groupProperty, function (o, e) {
var label = $scope._interpolatedItemLabel(o);
var prop = o[attrs.tickProperty];
o[attrs.tickProperty] = tree[e][label];
if (tree[e] && o[attrs.tickProperty] !== tree[e][label]) {
o[attrs.tickProperty] = tree[e][label];
}
return true;
});
};
Expand Down Expand Up @@ -783,8 +783,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 7ce575f

Please sign in to comment.