fixed a crash linked to incorrect textureDescriptors
This commit is contained in:
parent
842eadeb59
commit
5b75d028bf
|
@ -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));
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue