mirror of
https://github.com/apache/cordova-plugin-screen-orientation.git
synced 2025-05-07 19:05:38 +08:00
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:
parent
9a668cc721
commit
e0a1f3948c
@ -84,7 +84,7 @@ function addScreenOrientationApi (screenObject) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resolveOrientation (orientation, resolve, reject) {
|
function resolveOrientation (orientation, resolve, reject) {
|
||||||
if (!Object.prototype.hasOwnProperty.call(OrientationLockType, 'orientation')) {
|
if (!Object.prototype.hasOwnProperty.call(OrientationLockType, orientation)) {
|
||||||
var err = new Error();
|
var err = new Error();
|
||||||
err.name = 'NotSupportedError';
|
err.name = 'NotSupportedError';
|
||||||
reject(err); // "cannot change orientation");
|
reject(err); // "cannot change orientation");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user