Nicholas Barlow пре 4 година
родитељ
комит
309b96e8be
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/Materials/material.ts

+ 1 - 1
src/Materials/material.ts

@@ -664,7 +664,7 @@ export class Material implements IAnimatable {
         this._scene = scene || EngineStore.LastCreatedScene;
 
         this.id = name || Tools.RandomId();
-        while (this._scene.getMaterialByID(this.id) !== null) {
+        while (this._scene.getMaterialByID(this.id)) {
             this.id = name + " " + idSubscript++;
         }