mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-15 12:23:51 +00:00
refactor: improve typing
This commit is contained in:
committed by
Carlos Valente
parent
81a07099ae
commit
b7daf2926a
@@ -9,7 +9,11 @@ export function getNetworkInterfaces(): { name: string; address: string }[] {
|
||||
const results: { name: string; address: string }[] = [];
|
||||
|
||||
for (const name of Object.keys(nets)) {
|
||||
for (const net of nets[name]) {
|
||||
const netObjects = nets[name];
|
||||
if (!netObjects) {
|
||||
continue;
|
||||
}
|
||||
for (const net of netObjects) {
|
||||
// Skip over non-IPv4 and internal (i.e. 127.0.0.1) addresses
|
||||
if (net.family === 'IPv4' && !net.internal) {
|
||||
results.push({
|
||||
|
||||
Reference in New Issue
Block a user