소스 검색

hasOwnProperty warning

sebavan 7 년 전
부모
커밋
f3b55f7779
2개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 3
      materialsLibrary/src/legacy/legacy.ts
  2. 1 3
      proceduralTexturesLibrary/src/legacy/legacy.ts

+ 1 - 3
materialsLibrary/src/legacy/legacy.ts

@@ -10,9 +10,7 @@ var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !=
 if (typeof globalObject !== "undefined") {
     (<any>globalObject).BABYLON = (<any>globalObject).BABYLON || {};
     for (var mat in MatLib) {
-        if (MatLib.hasOwnProperty(mat)) {
-            (<any>globalObject).BABYLON[mat] = (<any>MatLib)[mat];
-        }
+        (<any>globalObject).BABYLON[mat] = (<any>MatLib)[mat];
     }
 }
 

+ 1 - 3
proceduralTexturesLibrary/src/legacy/legacy.ts

@@ -10,9 +10,7 @@ var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !=
 if (typeof globalObject !== "undefined") {
     (<any>globalObject).BABYLON = (<any>globalObject).BABYLON || {};
     for (var mat in ProceduralTexturesLib) {
-        if (ProceduralTexturesLib.hasOwnProperty(mat)) {
-            (<any>globalObject).BABYLON[mat] = (<any>ProceduralTexturesLib)[mat];
-        }
+        (<any>globalObject).BABYLON[mat] = (<any>ProceduralTexturesLib)[mat];
     }
 }