cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/9] cordova-plugin-screen-orientation git commit: puts all nativelock handling together
Date Wed, 22 Feb 2017 03:26:44 GMT
Repository: cordova-plugin-screen-orientation
Updated Branches:
  refs/heads/master 912b6b199 -> 70dfab7f9


puts all nativelock handling together


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/commit/68693cf0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/tree/68693cf0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/diff/68693cf0

Branch: refs/heads/master
Commit: 68693cf017440e5931c4cd209d0ec96ea7d2406a
Parents: 050cc06
Author: maverickmishra <vishalmishra0907@gmail.com>
Authored: Tue Jan 10 15:27:38 2017 -0800
Committer: maverickmishra <vishalmishra0907@gmail.com>
Committed: Wed Jan 25 10:47:32 2017 -0800

----------------------------------------------------------------------
 www/screenorientation.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-screen-orientation/blob/68693cf0/www/screenorientation.js
----------------------------------------------------------------------
diff --git a/www/screenorientation.js b/www/screenorientation.js
index 0711387..baf42a4 100644
--- a/www/screenorientation.js
+++ b/www/screenorientation.js
@@ -56,15 +56,15 @@
             var p = new Promise(function(resolve, reject) {
                 if (screenObject.nativeLock != null) {
                     promiseLock = screenObject.nativeLock(orientation);
-                } else {
-                    resolveOrientation(orientation, resolve, reject);
-                }
-                promiseLock.then(function success(res) {
+                    promiseLock.then(function success(res) {
                     resolve();
                 }, function error(err) {
                     screenObject.nativeLock = null;
                     resolveOrientation(orientation, resolve, reject);
                 });
+                } else {
+                    resolveOrientation(orientation, resolve, reject);
+                }
             })
             return p;
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message