fix modelcomponent attach scene bug (#6056)

This commit is contained in:
zxg0622
2020-01-08 15:50:14 +08:00
committed by pandamicro
parent 7e5bfd67d5
commit 7e26112852
+1 -1
View File
@@ -177,7 +177,7 @@ export class ModelComponent extends RenderableComponent {
}
protected _attachToScene () {
if (!this.node.scene && !this._model) {
if (!this.node.scene || !this._model) {
return;
}
const scene = this._getRenderScene();