fixed a crash linked to incorrect textureDescriptors

This commit is contained in:
kharhamel 2021-01-14 11:38:20 +01:00
parent 842eadeb59
commit 5b75d028bf
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ export const lazyLoadPlayerCharacterTextures = (loadPlugin: LoaderPlugin, textur
const textureName = typeof textureKey === 'string' ? textureKey : textureKey.name;
if(!texturePlugin.exists(textureName)) {
console.log('Loading '+textureName)
const playerResourceDescriptor = typeof textureKey === 'string' ? getRessourceDescriptor(textureKey) : textureKey;
const playerResourceDescriptor = typeof textureKey !== 'string' && textureKey.img ? textureKey : getRessourceDescriptor(textureKey as unknown as string);
promisesList.push(createLoadingPromise(loadPlugin, playerResourceDescriptor));
}
})