diafygi / webrtc-ips

Demo: https://diafygi.github.io/webrtc-ips/
MIT License
3.44k stars 598 forks source link

Checking for ip_regex.exec(candidate) to return null. #24

Open TWithers opened 8 years ago

TWithers commented 8 years ago

I get several errors when running the getIPs function because the ip_regex.exec(candidate) returns null. Adding this check will ensure that the ip_addr only gets populated with valid ips and eliminates errors.

TWithers commented 8 years ago

On second glance, this appears to only affect Chrome 46. Firefox has no issues. Don't know if it affects Chrome below 46.