소스 검색

make sure engine exists before trying to use it

Raanan Weber 5 년 전
부모
커밋
e41e4c8658
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Playground/js/main.js

+ 1 - 1
Playground/js/main.js

@@ -220,7 +220,7 @@ class Main {
     constructor(parent) {
         this.parent = parent;
 
-        if (typeof BABYLON !== 'undefined') {
+        if (typeof BABYLON !== 'undefined' && BABYLON.Engine) {
             BABYLON.Engine.ShadersRepository = "/src/Shaders/";
         }
         this.snippetV3Url = "https://snippet.babylonjs.com"