diff --git a/packages/loader-base/src/atlasLoader.ts b/packages/loader-base/src/atlasLoader.ts index 454cc3c1..78aae5ba 100644 --- a/packages/loader-base/src/atlasLoader.ts +++ b/packages/loader-base/src/atlasLoader.ts @@ -97,13 +97,17 @@ const spineTextureAtlasLoader: AssetExtension { return async (pageName: string, textureLoadedCallback: (tex: BaseTexture) => any): Promise => { - // const url = utils.path.join(...atlasBasePath.split(utils.path.sep), pageName); // Broken in upstream + try { + // const url = utils.path.join(...atlasBasePath.split(utils.path.sep), pageName); // Broken in upstream - const url = utils.path.normalize([...atlasBasePath.split(utils.path.sep), pageName].join(utils.path.sep)); + const url = utils.path.normalize([...atlasBasePath.split(utils.path.sep), pageName].join(utils.path.sep)); - const texture = await loader.load({ src: url, data: imageMetadata }); + const texture = await loader.load({ src: url, data: imageMetadata }); - textureLoadedCallback(texture.baseTexture); + textureLoadedCallback(texture.baseTexture); + } catch { + textureLoadedCallback(null); + } }; };