Browse Source

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

Dave Solares 5 years ago
parent
commit
1b1f35ea33
1 changed files with 1 additions and 1 deletions
  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);
         }