Explorar o código

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

Dave Solares %!s(int64=5) %!d(string=hai) anos
pai
achega
1b1f35ea33
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
         }