cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject webworks commit: CB-6925 simulator detection: fail gracefully w/ no DHCP leases
Date Thu, 12 Jun 2014 15:35:24 GMT
Repository: cordova-blackberry
Updated Branches:
  refs/heads/master e2f382aed -> 8ca4044df


CB-6925 simulator detection: fail gracefully w/ no DHCP leases


Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/8ca4044d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/8ca4044d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/8ca4044d

Branch: refs/heads/master
Commit: 8ca4044df41637fbebf39e6a3ac7a13e80cbc9c1
Parents: e2f382a
Author: Josh Soref <jsoref@blackberry.com>
Authored: Wed Jun 11 16:25:24 2014 -0400
Committer: Josh Soref <jsoref@blackberry.com>
Committed: Wed Jun 11 16:25:34 2014 -0400

----------------------------------------------------------------------
 blackberry10/bin/templates/project/cordova/lib/target-utils.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/8ca4044d/blackberry10/bin/templates/project/cordova/lib/target-utils.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/target-utils.js b/blackberry10/bin/templates/project/cordova/lib/target-utils.js
index b3395c1..bb3b34d 100755
--- a/blackberry10/bin/templates/project/cordova/lib/target-utils.js
+++ b/blackberry10/bin/templates/project/cordova/lib/target-utils.js
@@ -209,7 +209,7 @@ _self = {
         fs.readFile(pathVmDhcpLeases, 'utf8', function (err, data) {
             if (!err) {
                 // Find all lines that start with "lease xxx.xxx.xxx.xxx "
-                dhcpIPs = data.match(/lease \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} /g);
+                dhcpIPs = data.match(/lease \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} /g) || [];
                 dhcpIPs = dhcpIPs.map(function (result) {
                     return result.substr(6, result.indexOf(' ', 7) - 6);
                 });


Mime
View raw message