Skip to content

Commit fa69ce2

Browse files
committed
company should be an array.
Signed-off-by: Eric Wang <[email protected]>
1 parent 25d0d12 commit fa69ce2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/commands/list.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ cmd.handler = function(argv) {
8686
}
8787

8888
if (argv.tag) {
89-
var tag = argv.tag;
89+
var tag = argv.tag.toLowerCase();
9090
// TODO: fill company/tags in problems
9191
problems = _.filter(problems, function(x) {
9292
return x.category === tag ||
93-
x.company === tag ||
94-
(x.tags && x.tags.indexOf(tag) !== -1);
93+
(_.isArray(x.companies) && x.companies.indexOf(tag) !== -1) ||
94+
(_.isArray(x.tags) && x.tags.indexOf(tag) !== -1);
9595
});
9696
}
9797

0 commit comments

Comments
 (0)