Avoid errors if no email address was provided

This commit is contained in:
Nathan Gray 2013-12-19 17:16:33 +00:00
parent 380b5bae2d
commit 89e1757d9e

View File

@ -39,9 +39,9 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) {
function mailto(uri)
{
// Parse uri into a map
var match = uri.match(/^mailto:([^?]+)\??(([^=]+)([^&]+))*$/);
var match = uri.match(/^mailto:([^?]+)\??(([^=]+)([^&]+))*$/) || [];
var content = {
to: match[1]
to: match[1] || []
}
for(var i = 2; i < match.length; i+=2)
{