Skip to content

Commit ba525e7

Browse files
committed
Fix bugs
1 parent f670105 commit ba525e7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

index.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,19 @@ module.exports = function(options) {
2828
}
2929
},
3030
item: function(item, columns, searchArguments) {
31+
var found = true;
3132
for(var i = 0; i < searchArguments.length; i++) {
33+
var foundArgument = false;
3234
for (var j = 0, jl = columns.length; j < jl; j++) {
3335
if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) {
34-
item.found = true;
35-
break;
36+
foundArgument = true;
3637
}
3738
}
39+
if(!foundArgument) {
40+
found = false;
41+
}
3842
}
43+
item.found = found;
3944
},
4045
values: function(values, value, searchArgument) {
4146
if (values.hasOwnProperty(value)) {

src/fuzzy.js

+1
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,6 @@ module.exports = function(text, pattern, options) {
118118
}
119119
last_rd = rd;
120120
}
121+
121122
return (best_loc < 0) ? false : true;
122123
};

0 commit comments

Comments
 (0)