Raanan Weber преди 5 години
родител
ревизия
5ec117e974
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      src/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.ts
  2. 1 1
      src/Cameras/Inputs/freeCameraDeviceOrientationInput.ts

+ 1 - 1
src/Cameras/Inputs/arcRotateCameraVRDeviceOrientationInput.ts

@@ -72,7 +72,7 @@ export class ArcRotateCameraVRDeviceOrientationInput implements ICameraInput<Arc
             if (typeof (<any>DeviceOrientationEvent).requestPermission === 'function') {
                 (<any>DeviceOrientationEvent).requestPermission()
                     .then((response: string) => {
-                        if (response == 'granted') {
+                        if (response === 'granted') {
                             hostWindow!.addEventListener("deviceorientation", this._deviceOrientationHandler);
                         } else {
                             Tools.Warn("Permission not granted.");

+ 1 - 1
src/Cameras/Inputs/freeCameraDeviceOrientationInput.ts

@@ -146,7 +146,7 @@ export class FreeCameraDeviceOrientationInput implements ICameraInput<FreeCamera
             if (typeof (<any>DeviceOrientationEvent).requestPermission === 'function') {
                 (<any>DeviceOrientationEvent).requestPermission()
                     .then((response: string) => {
-                        if (response == 'granted') {
+                        if (response === 'granted') {
                             eventHandler();
                         } else {
                             Tools.Warn("Permission not granted.");