Give more detailed error when move animation fails to load

pull/33/head
Flashfyre 2024-04-04 09:22:12 -04:00
parent b2441fb365
commit 6c59ed27ce
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ export function initMoveAnim(move: Moves): Promise<void> {
fetch(`./battle-anims/${Moves[move].toLowerCase().replace(/\_/g, '-')}.json`) fetch(`./battle-anims/${Moves[move].toLowerCase().replace(/\_/g, '-')}.json`)
.then(response => { .then(response => {
if (!response.ok) { if (!response.ok) {
console.error(response.statusText); console.error(response.status, response.statusText);
if (move !== defaultMoveAnim) if (move !== defaultMoveAnim)
fetchAnimAndResolve(defaultMoveAnim); fetchAnimAndResolve(defaultMoveAnim);
else else