Sfoglia il codice sorgente

Switched getTotalVertices to be stricter if check.

Michael Schlotfeldt 8 anni fa
parent
commit
ea4dc80383
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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.
          * Returns a positive integer : the total number of vertices within the mesh geometry or zero if the mesh has no geometry.
          */
          */
         public getTotalVertices(): number {
         public getTotalVertices(): number {
-            if (!this._geometry) {
+            if (this._geometry === null || this._geometry === undefined) {
                 return 0;
                 return 0;
             }
             }
             return this._geometry.getTotalVertices();
             return this._geometry.getTotalVertices();