瀏覽代碼

Switched getTotalVertices to be stricter if check.

Michael Schlotfeldt 7 年之前
父節點
當前提交
ea4dc80383
共有 1 個文件被更改,包括 1 次插入1 次删除
  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();