HotFix custom WOKA (#999)

This commit is contained in:
grégoire parant 2021-05-06 19:58:08 +02:00 committed by GitHub
parent 46978d26f9
commit 0e32238505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ export class CustomizeScene extends AbstractCharacterScene {
this.layers = loadAllLayers(this.load); this.layers = loadAllLayers(this.load);
this.loadCustomSceneSelectCharacters().then((bodyResourceDescriptions) => { this.loadCustomSceneSelectCharacters().then((bodyResourceDescriptions) => {
bodyResourceDescriptions.forEach((bodyResourceDescription) => { bodyResourceDescriptions.forEach((bodyResourceDescription) => {
if(!bodyResourceDescription.level){ if(bodyResourceDescription.level == undefined || bodyResourceDescription.level < 0 || bodyResourceDescription.level > 5 ){
throw 'Texture level is null'; throw 'Texture level is null';
} }
this.layers[bodyResourceDescription.level].unshift(bodyResourceDescription); this.layers[bodyResourceDescription.level].unshift(bodyResourceDescription);