Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

TypeError: undefined is not an object (evaluating 'phantom.args.length') #15

Open
hotbaby opened this issue Jul 4, 2017 · 1 comment

Comments

@hotbaby
Copy link

hotbaby commented Jul 4, 2017

No description provided.

@hotbaby
Copy link
Author

hotbaby commented Jul 4, 2017

diff --git a/confess.js b/confess.js
index 6164d55..99ea04d 100644
--- a/confess.js
+++ b/confess.js
@@ -1,3 +1,4 @@
+var system = require('system');
 var fs = require('fs');
 var confess = {
 
@@ -411,11 +412,11 @@ var confess = {
     },
 
     processArgs: function (config, contract) {
-        var a = 0;
+        var a = 1;
         var ok = true;
         contract.forEach(function(argument) {
-            if (a < phantom.args.length) {
-                config[argument.name] = phantom.args[a];
+            if (a < system.args.length) {
+                config[argument.name] = system.args[a];
             } else {
                 if (argument.req) {
                     console.log('"' + argument.name + '" argument is required. This ' + argument.desc + '.');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant