浏览代码

debug layer fix

sebavan 6 年之前
父节点
当前提交
c40f13c6fb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Debug/debugLayer.ts

+ 1 - 1
src/Debug/debugLayer.ts

@@ -171,7 +171,7 @@ declare module "../scene" {
             }
             }
 
 
             // In case of module let s check the global emitted from the Inspector entry point.
             // In case of module let s check the global emitted from the Inspector entry point.
-            if (BABYLON && BABYLON.Inspector) {
+            if (typeof BABYLON !== 'undefined' && typeof  BABYLON.Inspector !== 'undefined') {
                 return BABYLON;
                 return BABYLON;
             }
             }