Skip to content
Snippets Groups Projects
Commit a5261f18 authored by danieldeng2's avatar danieldeng2
Browse files

Fix search logic error

parent d673d5ac
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ function includeInSearchResult(item: Resource, searchText: string) {
let type = item.type.toLowerCase();
while ((match = rx.exec(searchText)) !== null) {
switch (match[1]) {
case "type":
if (type !== match[2]) {
......@@ -40,7 +41,7 @@ function includeInSearchResult(item: Resource, searchText: string) {
}
let rest = searchText.replace(rx, "").trim();
if (tags.some((tag) => tag.indexOf(rest) !== -1)) {
return false;
return true;
}
return title.indexOf(rest) !== -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment