Browse Source

Switched getTotalVertices to be stricter if check.

Michael Schlotfeldt 7 years ago
parent
commit
ea4dc80383
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Mesh/babylon.mesh.ts

+ 1 - 1
src/Mesh/babylon.mesh.ts

@@ -427,7 +427,7 @@
          * Returns a positive integer : the total number of vertices within the mesh geometry or zero if the mesh has no geometry.
          */
         public getTotalVertices(): number {
-            if (!this._geometry) {
+            if (this._geometry === null || this._geometry === undefined) {
                 return 0;
             }
             return this._geometry.getTotalVertices();