diff --git a/packages/loader/src/scene-loader/resources/GLTFResource.ts b/packages/loader/src/scene-loader/resources/GLTFResource.ts index d77417b577..04334b13a3 100644 --- a/packages/loader/src/scene-loader/resources/GLTFResource.ts +++ b/packages/loader/src/scene-loader/resources/GLTFResource.ts @@ -113,7 +113,7 @@ export class GLTFResource extends SchemaResource { newMaterial.push(matStructure); }); }); - const loadAttachedController = animatorControllerLoadPromise.then((res) => { + const loadAttachedController = animatorControllerLoadPromise ? animatorControllerLoadPromise.then((res) => { const { animatorControllers } = result.structure.props; const controllerStructure = res.structure; const controllerResource = res.resources[controllerStructure.index]; @@ -129,7 +129,7 @@ export class GLTFResource extends SchemaResource { } } animatorControllers.push(controllerStructure); - }); + }) : Promise.resolve(); Promise.all([loadAttachedMaterial, loadAttachedController]).then(() => { resolve(result); });