You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sg...@apache.org on 2015/02/20 11:12:46 UTC

cordova-windows git commit: fixes jshint errors

Repository: cordova-windows
Updated Branches:
  refs/heads/master efa068a09 -> 738a4a15f


fixes jshint errors


Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/738a4a15
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/738a4a15
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/738a4a15

Branch: refs/heads/master
Commit: 738a4a15f98b460a515982079cccdc49ed28d3bc
Parents: efa068a
Author: sgrebnov <v-...@microsoft.com>
Authored: Fri Feb 20 13:12:37 2015 +0300
Committer: sgrebnov <v-...@microsoft.com>
Committed: Fri Feb 20 13:12:37 2015 +0300

----------------------------------------------------------------------
 template/cordova/lib/prepare.js | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/738a4a15/template/cordova/lib/prepare.js
----------------------------------------------------------------------
diff --git a/template/cordova/lib/prepare.js b/template/cordova/lib/prepare.js
index 7ebf0e4..4b4c8c7 100644
--- a/template/cordova/lib/prepare.js
+++ b/template/cordova/lib/prepare.js
@@ -132,9 +132,9 @@ function applyCoreProperties(config, manifest, manifestPath) {
     }
 
     // Supported orientations
-    var isWin80 = manifest.find('.//VisualElements') != null;
-    var isWin81 = manifest.find('.//m2:VisualElements') != null;
-    var isWP81 = manifest.find('.//m3:VisualElements') != null;
+    var isWin80 = manifest.find('.//VisualElements') !== null;
+    var isWin81 = manifest.find('.//m2:VisualElements') !== null;
+    var isWP81 = manifest.find('.//m3:VisualElements') !== null;
 
     var rotationPreferenceName, rotationPreferenceRootName;
 
@@ -150,28 +150,28 @@ function applyCoreProperties(config, manifest, manifestPath) {
     }
 
     var orientation = config.getPreference('Orientation');
+    var rotationPreferenceRoot;
     if (orientation) {
-        var rotationPreferenceRoot = manifest.find('.//' + rotationPreferenceRootName);
-        if(rotationPreferenceRoot == null) {
+        rotationPreferenceRoot = manifest.find('.//' + rotationPreferenceRootName);
+        if(rotationPreferenceRoot === null) {
             visualElems.append(et.Element(rotationPreferenceRootName));
             rotationPreferenceRoot = manifest.find('.//' + rotationPreferenceRootName);
         }
 
         rotationPreferenceRoot.clear();
 
-        function applyOrientations(orientationsArr) {
+        var applyOrientations = function(orientationsArr) {
             orientationsArr.forEach(function(orientationValue) {
-                var el = et.Element(rotationPreferenceName)
+                var el = et.Element(rotationPreferenceName);
                 el.attrib.Preference = orientationValue;
                 rotationPreferenceRoot.append(el);
             });
-        }
+        };
 
         // Updates supported orientations
         //<InitialRotationPreference>
         //    <Rotation Preference = "portrait" | "landscape" | "portraitFlipped" | "landscapeFlipped" /> {1,4}
         //</InitialRotationPreference>
-        var orientations;
         if(orientation === 'default') {
             // This means landscape and portrait
             applyOrientations(['portrait', 'landscape', 'landscapeFlipped']);
@@ -184,8 +184,8 @@ function applyCoreProperties(config, manifest, manifestPath) {
         }
     } else {
         // Remove InitialRotationPreference root element to revert to defaults
-        var rotationPreferenceRoot = visualElems.find('.//' + rotationPreferenceRootName);
-        if(rotationPreferenceRoot != null) {
+        rotationPreferenceRoot = visualElems.find('.//' + rotationPreferenceRootName);
+        if(rotationPreferenceRoot !== null) {
             visualElems.remove(null, rotationPreferenceRoot);
         }
     }


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