Make sure _with value is not null when trying to replace it into url, it causes broken url while using _replace argument from refresh_opener

This commit is contained in:
Hadi Nategh 2014-07-18 09:16:41 +00:00
parent 4fc6102162
commit a2bac6e07a

View File

@ -273,7 +273,7 @@ egw.extend('message', egw.MODULE_WND_LOCAL, function(_app, _wnd)
if (typeof _replace != 'undefined')
{
href = href.replace(typeof _replace == 'string' ? new RegExp(_replace) : _replace, typeof _with != 'undefined' ? _with : '');
href = href.replace(typeof _replace == 'string' ? new RegExp(_replace) : _replace, (typeof _with != 'undefined' && _with != null) ? _with : '');
}
if (href.indexOf('msg=') != -1)