Always convert petName to image hash in loadCustomPetData #1

Closed
dice wants to merge 2 commits from dice/impress-2020:always-use-@ into main
Showing only changes of commit 261f19a270 - Show all commits

View file

@ -58,6 +58,7 @@ const PETS_CP_URL_PATTERN =
/https?:\/\/pets\.neopets\.com\/cp\/([a-z0-9]+)\/[0-9]+\/[0-9]+\.png/;
async function loadImageHashFromPetName(petName) {
const res = await fetch(`https://pets.neopets.com/cpn/${petName}/1/1.png`, {
method: "HEAD",
redirect: "manual",
});
if (res.status !== 302) {