Skip to content

Commit

Permalink
fix support node 18
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Taran committed Jun 21, 2022
1 parent 9bbc24f commit 4fcdb78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/networkinterfaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ module.exports = function () {
var hasAddresses = false;
ifaces[iface].forEach(function (address) {
if (!address.internal) {
addresses[(address.family || "").toLowerCase()] = address.address;
var family = typeof address.family === 'number' ? "ipv" + address.family : address.family.toLowerCase() || "";
addresses[family] = address.address;
hasAddresses = true;
if (address.mac && address.mac !== '00:00:00:00:00:00') {
addresses.mac = address.mac;
Expand Down

0 comments on commit 4fcdb78

Please sign in to comment.