fix: resolveOrientation function not working correctly (#77)

Fixing a problem that was making the screen not to be locked as described on https://www.outsystems.com/forums/discussion/67761/resolveorientation-bug/
This commit is contained in:
iktumi 2021-01-22 17:06:37 +00:00 committed by GitHub
parent 9a668cc721
commit e0a1f3948c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ function addScreenOrientationApi (screenObject) {
}
function resolveOrientation (orientation, resolve, reject) {
if (!Object.prototype.hasOwnProperty.call(OrientationLockType, 'orientation')) {
if (!Object.prototype.hasOwnProperty.call(OrientationLockType, orientation)) {
var err = new Error();
err.name = 'NotSupportedError';
reject(err); // "cannot change orientation");