Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/cards/card-database.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ async function fetchPokewalletRarities(setCodesWithoutRarity, timeout = 15000) {
});
clearTimeout(timer);
if (!res.ok) return map;
pwSets = await res.json();
const body = await res.json();
pwSets = body.data || body;
if (!Array.isArray(pwSets)) return map;
} catch {
return map;
}
Expand Down Expand Up @@ -396,7 +398,7 @@ async function enrichWithPokewalletRarities(index) {
let enriched = 0;
for (const card of index) {
if (card.rarity) continue;
const normId = normalizeCardId(card.id);
const normId = normalizeCardId(card.id).toLowerCase();
const rarity = pwRarities.get(normId);
if (rarity) {
card.rarity = rarity;
Expand Down
Loading