cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/3] cordova-lib git commit: Fix create argument prerequisite check
Date Sat, 31 Oct 2015 00:08:36 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/5.4.x [created] 1ce6a5a24


Fix create argument prerequisite check

Store argument.length from create before return call
Update returns prerequisite checks to use the previously stored arg length. This closes #337


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/40ecced7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/40ecced7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/40ecced7

Branch: refs/heads/5.4.x
Commit: 40ecced7ae5fe57ef615d9941af1caee59800676
Parents: 95c70c6
Author: Toni <ZombieProtectionAgency@users.noreply.github.com>
Authored: Thu Oct 29 18:05:04 2015 -0400
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Fri Oct 30 16:43:17 2015 -0700

----------------------------------------------------------------------
 cordova-lib/src/cordova/create.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/40ecced7/cordova-lib/src/cordova/create.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/create.js b/cordova-lib/src/cordova/create.js
index 1eded17..1f5e010 100644
--- a/cordova-lib/src/cordova/create.js
+++ b/cordova-lib/src/cordova/create.js
@@ -39,13 +39,15 @@ var path          = require('path'),
 // Returns a promise.
 module.exports = create;
 function create(dir, optionalId, optionalName, cfg) {
+    var argumentCount = arguments.length;
+    
     return Q.fcall(function() {
         // Lets check prerequisites first
 
-        if (arguments.length == 3) {
+        if (argumentCount == 3) {
           cfg = optionalName;
           optionalName = undefined;
-        } else if (arguments.length == 2) {
+        } else if (argumentCount == 2) {
           cfg = optionalId;
           optionalId = undefined;
           optionalName = undefined;


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


Mime
View raw message