Make non-colored resources and event match under "None"

This commit is contained in:
Hamcha 2019-09-10 10:17:42 +02:00
parent 301ecf77bd
commit 06d0b5ded0
Signed by: hamcha
GPG key ID: 44AD3571EB09A39E

View file

@ -119,6 +119,15 @@ export async function getCards(filter: CardFilter) {
}
}
}
// For "None" element searches, "nothing" is actually ok
if (
filter.Elements.includes("None") &&
x.Element.length == 0 &&
(!x.Requirement || x.Requirement.length == 0) &&
(!x.ProblemRequirement || x.ProblemRequirement.length == 0)
) {
found = true;
}
if (!found) {
return false;
}