Bläddra i källkod

better eq check

Raanan Weber 5 år sedan
förälder
incheckning
5ec117e974

+ 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.");