Skip to content

Commit

Permalink
check before ignore.some(), minor but measurable optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Isao Yagi committed Jul 26, 2013
1 parent 82624c8 commit 65f0ec0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -125,7 +125,7 @@ Scan.prototype.getStatCb = function(item, list) {
if (err) {
type = 'error';

} else if (self.ignore.some(match(item))) {
} else if (self.ignore.length && self.ignore.some(match(item))) {
type = 'ignored';

} else {
Expand Down

0 comments on commit 65f0ec0

Please sign in to comment.