Give more detailed error when move animation fails to load
parent
b2441fb365
commit
6c59ed27ce
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue