Skip to content

Commit 7c32062

Browse files
authored
fix: parse PokeWallet sets response from data field (#149)
1 parent cf703c2 commit 7c32062

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/cards/card-database.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ async function fetchPokewalletRarities(setCodesWithoutRarity, timeout = 15000) {
151151
});
152152
clearTimeout(timer);
153153
if (!res.ok) return map;
154-
pwSets = await res.json();
154+
const body = await res.json();
155+
pwSets = body.data || body;
156+
if (!Array.isArray(pwSets)) return map;
155157
} catch {
156158
return map;
157159
}

0 commit comments

Comments
 (0)