diff --git a/lib/chrome.js b/lib/chrome.js index 654c5d4..16bb024 100644 --- a/lib/chrome.js +++ b/lib/chrome.js @@ -66,7 +66,7 @@ var ChromeObject = function() { }; this.setDebuggingPort = function(n) { - this.debuggingPort = n; + this.debuggingPort = (typeof(n) !== "number" ? this.debuggingPort : n); } this.createShoutcut = function(url) { @@ -161,7 +161,7 @@ var ChromeObject = function() { if (this.inPrivate) { cmd.push("--incognito"); } - + if (this.debuggingPort > 0) { cmd.push("--remote-debugging-port=" + this.debuggingPort); }