fix(webpack): unit test runner with node 18+ (#9952)

This commit is contained in:
Nathan Walker
2022-07-09 09:06:45 -07:00
parent 38142a6aeb
commit 97a21bb0d7

View File

@ -5,9 +5,9 @@ export function getIPS() {
return Object.keys(interfaces)
.map((name) => {
return interfaces[name].filter(
(binding: any) => binding.family === 'IPv4'
(binding: any) => binding.family === 'IPv4' || binding.family === 4
)[0];
})
.filter(Boolean)
.filter((binding) => !!binding)
.map((binding) => binding.address);
}