From 9779366828b293420f1950bf3fd2e768fbb365b5 Mon Sep 17 00:00:00 2001 From: Jason Leyba Date: Tue, 10 Jun 2014 11:57:50 -0700 Subject: [PATCH] Properly handle absence of lo network interface. Fixes issue 7465. --- javascript/node/selenium-webdriver/CHANGES.md | 3 ++- javascript/node/selenium-webdriver/net/index.js | 3 ++- javascript/node/selenium-webdriver/package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/javascript/node/selenium-webdriver/CHANGES.md b/javascript/node/selenium-webdriver/CHANGES.md index 10ecb55e02502..2d7c98df88857 100644 --- a/javascript/node/selenium-webdriver/CHANGES.md +++ b/javascript/node/selenium-webdriver/CHANGES.md @@ -1,5 +1,6 @@ -## v2.43.0-dev +## v2.42.1 +* FIXED: 7465: Fixed `net.getLoopbackAddress` on Windows * FIXED: 7277: Support `done` callback in Mocha's BDD interface * FIXED: 7156: `Promise#thenFinally` should not suppress original error diff --git a/javascript/node/selenium-webdriver/net/index.js b/javascript/node/selenium-webdriver/net/index.js index 801ec2808dc8e..94c411443b160 100644 --- a/javascript/node/selenium-webdriver/net/index.js +++ b/javascript/node/selenium-webdriver/net/index.js @@ -41,7 +41,8 @@ function getAddress(loopback, opt_family) { var interfaces; if (loopback) { - interfaces = [getLoInterface()]; + var lo = getLoInterface(); + interfaces = lo ? [lo] : null; } interfaces = interfaces || os.networkInterfaces(); for (var key in interfaces) { diff --git a/javascript/node/selenium-webdriver/package.json b/javascript/node/selenium-webdriver/package.json index e79efb8765c96..7830eb9d7c842 100644 --- a/javascript/node/selenium-webdriver/package.json +++ b/javascript/node/selenium-webdriver/package.json @@ -1,6 +1,6 @@ { "name": "selenium-webdriver", - "version": "2.43.0-dev", + "version": "2.42.1", "description": "The official WebDriver JavaScript bindings from the Selenium project", "keywords": [ "automation",