Skip to content

Commit

Permalink
Fix broken search after pre-commit#512
Browse files Browse the repository at this point in the history
If `type` equals the empty string, no type filter should be applied.

Closes pre-commit#520
  • Loading branch information
jonasbb authored Jun 10, 2021
1 parent 9dd96e4 commit 6ef321c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/filter_repos.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
const hookId = repoHook.dataset.id.toLowerCase();
const hookTypes = repoHook.dataset.types.split(', ');

if (hookId.includes(id) && hookTypes.includes(type)) {
if (hookId.includes(id) && (type === '' || hookTypes.includes(type))) {
repoHook.hidden = false;
hasVisibleHooks = true;
} else {
Expand Down

0 comments on commit 6ef321c

Please sign in to comment.