Browse Source

Fix https://forum.babylonjs.com/t/assetcontainer-dispose-does-not-work/2971

David Catuhe 6 năm trước cách đây
mục cha
commit
5d73451db8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/assetContainer.ts

+ 1 - 1
src/assetContainer.ts

@@ -251,7 +251,7 @@ export class AssetContainer extends AbstractScene {
 
         for (let key in this) {
             if (this.hasOwnProperty(key)) {
-                (<any>this)[key] = (<any>this)[key] || [];
+                (<any>this)[key] = (<any>this)[key] || (key === "environmentTexture" ? null : []);
                 this._moveAssets((<any>this.scene)[key], (<any>this)[key], (<any>keepAssets)[key]);
             }
         }