There was an error while loading. Please reload this page.
1 parent 90286ec commit b233e94Copy full SHA for b233e94
1 file changed
.github-minimum-intelligence/lifecycle/local-chat.ts
@@ -1561,9 +1561,10 @@ function hostIPv4Prefixes(): string[] {
1561
const nets = networkInterfaces();
1562
for (const name of Object.keys(nets)) {
1563
for (const ni of nets[name] ?? []) {
1564
- // Node <18 reports `family` as a string ("IPv4"); newer versions may
+ // Node typings declare `family` as a string ("IPv4"); some runtimes
1565
// report the number 4. Accept both, and skip loopback/internal NICs.
1566
- const isV4 = ni.family === "IPv4" || (ni.family as unknown) === 4;
+ const fam = ni.family as unknown;
1567
+ const isV4 = fam === "IPv4" || fam === 4;
1568
if (!isV4 || ni.internal) continue;
1569
const parts = ni.address.split(".");
1570
if (parts.length !== 4) continue;
0 commit comments