mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
Check Against OK status
This commit is contained in:
parent
79f43194c2
commit
3536618deb
@ -332,8 +332,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
this.scene.cachedFetch(`./images/pokemon/variant/${useExpSprite ? 'exp/' : ''}${battleSpritePath}.json`).
|
this.scene.cachedFetch(`./images/pokemon/variant/${useExpSprite ? 'exp/' : ''}${battleSpritePath}.json`).
|
||||||
then(res => {
|
then(res => {
|
||||||
// Prevent the JSON from processing if it failed to load
|
// Prevent the JSON from processing if it failed to load
|
||||||
if (res.status === 404) {
|
if (!res.ok) {
|
||||||
console.error(`Could not load ${res.url}!`)
|
console.error(`Could not load ${res.url}!`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
res.json()
|
res.json()
|
||||||
|
Loading…
Reference in New Issue
Block a user