mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-07 14:39:43 +01:00
Make sure url has a value before matching, prevents errors with some dialogs
This commit is contained in:
parent
7f8b201330
commit
1fd14256f7
@ -325,7 +325,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
|||||||
this.name = _name; // store top-level template name to have it available in widgets
|
this.name = _name; // store top-level template name to have it available in widgets
|
||||||
// store template base url, in case initial template is loaded via webdav, to use that for further loads too
|
// store template base url, in case initial template is loaded via webdav, to use that for further loads too
|
||||||
// need to split off domain first, as it could contain app-name part of template eg. stylite.report.xet and https://my.stylite.de/egw/...
|
// need to split off domain first, as it could contain app-name part of template eg. stylite.report.xet and https://my.stylite.de/egw/...
|
||||||
if (_url[0] != '/')
|
if (_url && _url[0] != '/')
|
||||||
{
|
{
|
||||||
this.template_base_url = _url.match(/https?:\/\/[^/]+/).shift();
|
this.template_base_url = _url.match(/https?:\/\/[^/]+/).shift();
|
||||||
_url = _url.split(this.template_base_url)[1];
|
_url = _url.split(this.template_base_url)[1];
|
||||||
|
Loading…
Reference in New Issue
Block a user