Browse Source

Add default value to Nullable<T> types, which match the expected discriminated union (T | null) from TypeScript definition. This is not backwards compatible and there are many more cases of undefined (T | null).
See discussion: http://www.html5gamedevs.com/topic/34533-csg-tomesh-material-required/?tab=comments#comment-198439

Brian Zinn 7 years ago
parent
commit
b8ce0358bc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Mesh/babylon.abstractMesh.ts

+ 2 - 2
src/Mesh/babylon.abstractMesh.ts

@@ -351,10 +351,10 @@
          * This scene's action manager
          * @type {BABYLON.ActionManager}
         */
-        public actionManager: Nullable<ActionManager>;
+        public actionManager: Nullable<ActionManager> = null;
 
         // Physics
-        public physicsImpostor: Nullable<PhysicsImpostor>;
+        public physicsImpostor: Nullable<PhysicsImpostor> = null;
 
         // Collisions
         private _checkCollisions = false;