From 89e1757d9e9aa4134c187122b4fd3d85dcd0a913 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 19 Dec 2013 17:16:33 +0000 Subject: [PATCH] Avoid errors if no email address was provided --- phpgwapi/js/jsapi/egw_open.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/js/jsapi/egw_open.js b/phpgwapi/js/jsapi/egw_open.js index 8489c0b9e6..cc11ba4a36 100644 --- a/phpgwapi/js/jsapi/egw_open.js +++ b/phpgwapi/js/jsapi/egw_open.js @@ -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) {