浏览代码

Fix for DeviceInputSystem when using non-native implementation (#8273)

Dave Solares 5 年之前
父节点
当前提交
1b1f35ea33
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/DeviceInput/deviceInputSystem.ts

+ 1 - 1
src/DeviceInput/deviceInputSystem.ts

@@ -65,7 +65,7 @@ export class DeviceInputSystem implements IDisposable {
      */
     public static Create(engine: Engine): DeviceInputSystem {
         // If running in Babylon Native, then defer to the native input system, which has the same public contract
-        if (typeof _native.DeviceInputSystem !== 'undefined') {
+        if (typeof _native !== 'undefined' && _native.DeviceInputSystem) {
             return new _native.DeviceInputSystem(engine);
         }