Skip to content
Snippets Groups Projects
Commit 05f7fe3e authored by rswindell's avatar rswindell
Browse files

Better undefined/null address detection in the parse() method.

parent f247ad5c
No related branches found
No related tags found
No related merge requests found
......@@ -150,8 +150,9 @@ var FIDO = {
var zone;
var domain;
m = addr.toString().match(/^(?:([0-9]+):)?([0-9]+)\/([0-9]+)(?:\.([0-9]+))?(?:@(.*))?$/);
if (m===null)
if(addr)
m = addr.toString().match(/^(?:([0-9]+):)?([0-9]+)\/([0-9]+)(?:\.([0-9]+))?(?:@(.*))?$/);
if (!m)
throw('invalid address '+addr);
zone = m[1];
domain = m[5];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment