Jelajahi Sumber

Update babylon.spriteManager.ts

Fix check for undefined
Pavel 8 tahun lalu
induk
melakukan
9468f09f0e
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/Sprites/babylon.spriteManager.ts

+ 1 - 1
src/Sprites/babylon.spriteManager.ts

@@ -52,7 +52,7 @@
             if (cellSize.width && cellSize.height) {
             if (cellSize.width && cellSize.height) {
                 this.cellWidth = cellSize.width;
                 this.cellWidth = cellSize.width;
                 this.cellHeight = cellSize.height;
                 this.cellHeight = cellSize.height;
-            } else if(cellSize === undefined) {
+            } else if(cellSize !== undefined) {
                 this.cellWidth = cellSize;
                 this.cellWidth = cellSize;
                 this.cellHeight = cellSize;
                 this.cellHeight = cellSize;
             } else {
             } else {