From 3536618deb6f98a96ae104534eb6a63595c2315d Mon Sep 17 00:00:00 2001 From: Benjamin Odom Date: Fri, 17 May 2024 20:50:11 -0500 Subject: [PATCH] Check Against OK status --- src/field/pokemon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 48fbe135cb9..af4ce17e139 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -332,8 +332,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.scene.cachedFetch(`./images/pokemon/variant/${useExpSprite ? 'exp/' : ''}${battleSpritePath}.json`). then(res => { // Prevent the JSON from processing if it failed to load - if (res.status === 404) { - console.error(`Could not load ${res.url}!`) + if (!res.ok) { + console.error(`Could not load ${res.url}!`); return; } res.json()