소스 검색

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);
         }