From adabb904b34e5e5316e0be56f0cd212607c73279 Mon Sep 17 00:00:00 2001 From: Jeff Mikels Date: Fri, 15 Jan 2021 00:12:02 -0500 Subject: [PATCH] installation instructions --- index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 795163b..04339d3 100644 --- a/index.js +++ b/index.js @@ -18,10 +18,11 @@ const print = console.log; // GLOBALS let myip = 'THIS_COMPUTER_IP'; for (let key of Object.keys(ifaces)) { - let device = ifaces[key][0] - if (device.family == 'IPv4' && !device.internal) { - myip = device.address; - break; + for (let device of ifaces[key]) { + if (device.family == 'IPv4' && !device.internal) { + myip = device.address; + break 2; + } } }