1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-04-22 10:52:10 +00:00

fix: incorrect set being reconized (#180)

* fix: set fetching name not stricly checking

Signed-off-by: Avior <github@avior.me>

* fix: finding card by set not testing set name

Signed-off-by: Avior <github@avior.me>

* fix: incorrect set being reconized

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
Florian Bouillon 2021-11-19 15:47:58 +01:00 committed by GitHub
parent d81275b679
commit afe33f4b3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ export default class Card implements LocalCard {
if (key === 'set' && typeof it === 'string') {
return (
c['set'].id.toLowerCase().includes(it.toLowerCase()) ||
c['set'].name?.toLowerCase()?.includes(it.toLowerCase())
(c['set'].name ? c['set'].name.toLowerCase().includes(it.toLowerCase()) : false)
)
}
if (typeof it === "string") {