fix tag resolving

This commit is contained in:
Erik 2020-08-04 12:35:00 +03:00
parent 21bafe1cfe
commit 2c928ca0d1

View File

@ -40,12 +40,12 @@ class Resolver {
}
componentsByTag(str, type, exact = true) {
componentsByTag(str, type = 'any', exact = true) {
const key = str.toLowerCase();
const components = this.client.registry.components
.filter((c) => c.type === type)
.filter((c) => type === 'any' || c.type === type)
.filter(exact ? (c) => c.tags.includes(key) : filterInexactTags(key))
.array();