Merge branch 'fixLazyLoadCrash' of github.com:thecodingmachine/workadventure into develop

This commit is contained in:
Ludwig Behm 2021-01-14 13:39:12 +01:00
commit dbc4736282

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));
}
})